diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-08 13:02:03 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-08 14:57:01 +0100 |
commit | a3c00d25d1bf6dc9ef554a44809e732a96ec1533 (patch) | |
tree | 0b9f7dd0ad5cb48c458487e3fd28960146830a95 /app/controllers/application_controller.rb | |
parent | 99548c87d201871a150e395c334e07149651996a (diff) |
Ensure we use sensible fallbacks for setting the default / initial locale for a user. (Partially) fixes #114
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ba1cf4900..2918f39c0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -42,7 +42,7 @@ class ApplicationController < ActionController::Base end def set_gettext_locale - requested_locale = params[:locale] || session[:locale] || cookies[:locale] || request.env['HTTP_ACCEPT_LANGUAGE'] + requested_locale = params[:locale] || session[:locale] || cookies[:locale] || request.env['HTTP_ACCEPT_LANGUAGE'] || I18n.default_locale session[:locale] = FastGettext.set_locale(requested_locale) end |