Explicitly select the default locale if we have no better ideas
This commit is contained in:
parent
4408416b62
commit
cbd687d0b1
1 changed files with 1 additions and 3 deletions
|
@ -247,9 +247,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
I18n.locale = request.compatible_language_from(I18n.available_locales)
|
||||
|
||||
logger.info "Selected locale #{I18n.locale} from #{request.user_preferred_languages.inspect}"
|
||||
I18n.locale = request.compatible_language_from(I18n.available_locales) || I18n.default_locale
|
||||
|
||||
response.headers['Content-Language'] = I18n.locale.to_s
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue