Permalink
Browse files

enforce group language

Signed-off-by: David A. Cuadrado <krawek@gmail.com>
  • Loading branch information...
1 parent 04e1637 commit cbe6205a526edeeec29e8cfd2b940bbf88330226 @dcu dcu committed Nov 23, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/controllers/application_controller.rb
@@ -157,7 +157,9 @@ def available_locales; AVAILABLE_LOCALES; end
def set_locale
locale = AppConfig.default_language || 'en'
if AppConfig.enable_i18n
- if logged_in?
+ if current_group.language.present?
+ I18n.locale = current_group.language
+ elsif logged_in?
locale = current_user.language
Time.zone = current_user.timezone || "UTC"
elsif params[:feed_token] && (feed_user = User.find_by_feed_token(params[:feed_token]))

0 comments on commit cbe6205

Please sign in to comment.