add site setting for setting locale from header

This commit is contained in:
scossar
2016-03-14 16:18:19 -07:00
parent 9fc9f029ea
commit 0cbeda8414
5 changed files with 26 additions and 3 deletions

View File

@ -165,7 +165,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