fixed new lang selector

This commit is contained in:
2022-09-13 13:28:05 +02:00
parent 20289eb01f
commit 4b256dd594

View File

@@ -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)