diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/concerns/localized.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/concerns/localized.rb b/app/controllers/concerns/localized.rb index 22bb5b21a..d9a7a7227 100644 --- a/app/controllers/concerns/localized.rb +++ b/app/controllers/concerns/localized.rb @@ -27,7 +27,11 @@ module Localized def default_locale ENV.fetch('DEFAULT_LOCALE') { - http_accept_language.compatible_language_from(I18n.available_locales) || I18n.default_locale + user_supplied_locale || I18n.default_locale } end + + def user_supplied_locale + http_accept_language.language_region_compatible_from(I18n.available_locales) + end end |