Merge pull request #34862 from bogdanvlviv/fix-i18n-guide

Fix example of I18n setting in the guide [ci skip]
This commit is contained in:
Vipul A M 2019-01-04 17:08:25 +03:00 committed by GitHub
commit de50002723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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