mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
Merge pull request #1922 from joallard/language-toggle
Allow users to toggle interface language in their preferences
This commit is contained in:
@ -109,7 +109,11 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def set_locale
|
||||
I18n.locale = SiteSetting.default_locale
|
||||
I18n.locale = if SiteSetting.allow_user_locale && current_user && current_user.locale.present?
|
||||
current_user.locale
|
||||
else
|
||||
SiteSetting.default_locale
|
||||
end
|
||||
end
|
||||
|
||||
def store_preloaded(key, json)
|
||||
|
Reference in New Issue
Block a user