From 758402311a97a053a5276049db6dce4f8f8dcfbc Mon Sep 17 00:00:00 2001 From: enahum Date: Tue, 28 Feb 2017 06:07:02 -0300 Subject: PLT-5548 Prevent server start if defaultLocate is not available (#5532) * PLT-5548 Prevent server start if defaultLocate is not available * Add validation for supported locales --- utils/i18n.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utils/i18n.go') diff --git a/utils/i18n.go b/utils/i18n.go index 8366ae75d..5a0bb197f 100644 --- a/utils/i18n.go +++ b/utils/i18n.go @@ -94,6 +94,10 @@ func GetTranslationsAndLocale(w http.ResponseWriter, r *http.Request) (i18n.Tran return translations, model.DEFAULT_LOCALE } +func GetSupportedLocales() map[string]string { + return locales +} + func TfuncWithFallback(pref string) i18n.TranslateFunc { t, _ := i18n.Tfunc(pref) return func(translationID string, args ...interface{}) string { -- cgit v1.2.3-1-g7c22