Merge pull request #4076 from scossar/locale-from-header-setting

FEATURE: add site setting for setting locale from header
This commit is contained in:
Sam
2016-03-17 07:53:20 +11:00
5 changed files with 27 additions and 3 deletions

View File

@ -169,7 +169,7 @@ class ApplicationController < ActionController::Base
def set_locale
if !current_user
if SiteSetting.allow_user_locale
if SiteSetting.set_locale_from_accept_language_header
I18n.locale = locale_from_header
else
I18n.locale = SiteSetting.default_locale