Merge pull request #34862 from bogdanvlviv/fix-i18n-guide
Fix example of I18n setting in the guide [ci skip]
This commit is contained in:
commit
de50002723
@ -299,7 +299,7 @@ A trivial implementation of using an `Accept-Language` header would be:
|
||||
def switch_locale(&action)
|
||||
logger.debug "* Accept-Language: #{request.env['HTTP_ACCEPT_LANGUAGE']}"
|
||||
locale = extract_locale_from_accept_language_header
|
||||
logger.debug "* Locale set to '#{I18n.locale}'"
|
||||
logger.debug "* Locale set to '#{locale}'"
|
||||
I18n.with_locale(locale, &action)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user