use env for localization to avoid db round trip
This commit is contained in:
parent
cd4ad6878c
commit
b87a691176
3 changed files with 4 additions and 2 deletions
|
@ -309,7 +309,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def set_locale
|
||||
if feature_enabled?(:localization)
|
||||
if ENV.fetch('LOCALIZATION_ENABLED', 'false') == 'true'
|
||||
I18n.locale = http_accept_language.compatible_language_from(I18n.available_locales)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue