fixed new lang selector
This commit is contained in:
4
main.go
4
main.go
@@ -624,11 +624,11 @@ func getMatchChat(c *gin.Context) {
|
|||||||
c.Status(http.StatusBadRequest)
|
c.Status(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var lang string
|
var lang language.Base
|
||||||
if len(tag) > 0 {
|
if len(tag) > 0 {
|
||||||
lang, _ = tag[0].Base()
|
lang, _ = tag[0].Base()
|
||||||
} else {
|
} else {
|
||||||
lang = "en"
|
lang, _ = language.AmericanEnglish.Base()
|
||||||
}
|
}
|
||||||
log.Debugf("[GMC] Got header %s, selected %s from %v (w: %v)", c.GetHeader("Accept-Language"), lang, tag, weights)
|
log.Debugf("[GMC] Got header %s, selected %s from %v (w: %v)", c.GetHeader("Accept-Language"), lang, tag, weights)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user