oops: only infer public locales from language header
This commit is contained in:
parent
eaf875c6c7
commit
895aef86c2
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base
|
|||
return params[:locale] if valid_locale?(params[:locale])
|
||||
return cookies[:locale] if valid_locale?(cookies[:locale])
|
||||
Rails.logger.debug "Preferred languages: #{http_accept_language.user_preferred_languages}"
|
||||
http_accept_language.language_region_compatible_from(I18n.available_locales.map(&:to_s)) ||
|
||||
http_accept_language.language_region_compatible_from(I18n.public_locales.map(&:to_s)) ||
|
||||
I18n.default_locale
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue