mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
add site setting for setting locale from header
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user