aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorRobert Dober2017-05-04 16:34:47 +0200
committerGitHub2017-05-04 16:34:47 +0200
commitdcab1737ff8618fb94bc2fb379502292e260f44f (patch)
tree412f51eab45fbc4d09cbc59cfa09f88ffc85f1aa /app/controllers
parentfb29c762d084e6f707adcf77dce88745fda09cff (diff)
parenta75b51bc9b4112d851a38f0e569565ce2c4602c6 (diff)
downloadchouette-core-dcab1737ff8618fb94bc2fb379502292e260f44f.tar.bz2
Merge pull request #8 from af83/configurable_locale
easy change locale for testing and developping translations
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index f2c9b4c6f..42b7c2a25 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -12,7 +12,10 @@ class ApplicationController < ActionController::Base
helper LanguageEngine::Engine.helpers
def set_locale
- I18n.locale = session[:language] || I18n.default_locale
+ # I18n.locale = session[:language] || I18n.default_locale
+ # For testing different locales w/o restarting the server
+ I18n.locale = (params['lang'] || session[:language] || I18n.default_locale).to_sym
+ logger.info "locale set to #{I18n.locale.inspect}"
end
def pundit_user