Allow users to toggle interface language in their preferences

This commit is contained in:
Jonathan Allard
2014-02-07 22:24:10 -05:00
parent 1a8ebb710e
commit c513725f26
11 changed files with 57 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 current_user && current_user.locale.present?
current_user.locale
else
SiteSetting.default_locale
end
end
def store_preloaded(key, json)