Merge pull request #1922 from joallard/language-toggle

Allow users to toggle interface language in their preferences
This commit is contained in:
Régis Hanol
2014-02-19 18:28:00 +01:00
14 changed files with 77 additions and 1 deletions

View File

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