Этот коммит содержится в:
=Corey Hulen
2016-01-22 10:38:49 -06:00
родитель 7e9b6dfcd0
Коммит 847754b3d7

Просмотреть файл

@@ -70,7 +70,7 @@ func SetTranslations(locale string) i18n.TranslateFunc {
func GetTranslationsAndLocale(w http.ResponseWriter, r *http.Request) (i18n.TranslateFunc, string) {
headerLocale := strings.Split(strings.Split(r.Header.Get("Accept-Language"), ",")[0], "-")[0]
if locales[headerLocale] != "" {
translations, _ := i18n.Tfunc(locale)
translations, _ := i18n.Tfunc(headerLocale)
return translations, headerLocale
}