If DEFAULT_LOCALE is set, enforce it instead of HTTP request locale (#6817)

Fix #6784
pull/6820/head
Eugen Rochko 7 years ago committed by GitHub
parent 721234230c
commit 39f27b6cf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,8 +17,12 @@ module Localized
end end
def default_locale def default_locale
if ENV['DEFAULT_LOCALE'].present?
I18n.default_locale
else
request_locale || I18n.default_locale request_locale || I18n.default_locale
end end
end
def request_locale def request_locale
preferred_locale || compatible_locale preferred_locale || compatible_locale

Loading…
Cancel
Save