diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-22 10:38:49 -0600 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-22 10:38:49 -0600 |
commit | 847754b3d76924a0aa43776bd1e8ae11b56c651b (patch) | |
tree | 6374d01679aa4fd095fe25c79d8b277589f18976 /utils | |
parent | 7e9b6dfcd0d14dc8edf45be7c8f378a071aee7b2 (diff) | |
download | chat-847754b3d76924a0aa43776bd1e8ae11b56c651b.tar.gz chat-847754b3d76924a0aa43776bd1e8ae11b56c651b.tar.bz2 chat-847754b3d76924a0aa43776bd1e8ae11b56c651b.zip |
PLT-7 adding loc header
Diffstat (limited to 'utils')
-rw-r--r-- | utils/i18n.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/i18n.go b/utils/i18n.go index 2800942ac..05154bd92 100644 --- a/utils/i18n.go +++ b/utils/i18n.go @@ -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 } |