Этот коммит содержится в:
Jesús Espino
2018-03-29 16:04:54 +02:00
коммит произвёл Harrison Healey
родитель eb48292a3a
Коммит 014a3b6a60
28 изменённых файлов: 44 добавлений и 44 удалений

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

@@ -96,7 +96,7 @@ func GetUserTranslations(locale string) i18n.TranslateFunc {
func GetTranslationsAndLocale(w http.ResponseWriter, r *http.Request) (i18n.TranslateFunc, string) {
// This is for checking against locales like pt_BR or zn_CN
headerLocaleFull := strings.Split(r.Header.Get("Accept-Language"), ",")[0]
// This is for checking agains locales like en, es
// This is for checking against locales like en, es
headerLocale := strings.Split(strings.Split(r.Header.Get("Accept-Language"), ",")[0], "-")[0]
defaultLocale := *settings.DefaultClientLocale
if locales[headerLocaleFull] != "" {