parent
6e404ddb93
commit
587a336cc7
@ -0,0 +1,14 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func SetLanguage(c *gin.Context){
|
||||
lang := c.Query("lang")
|
||||
if lang == "" ||lang!="cn"{
|
||||
lang = "en"
|
||||
}
|
||||
c.Set("lang",lang)
|
||||
}
|
||||
|
After Width: | Height: | Size: 39 KiB |
Loading…
Reference in new issue