diff options
| author | Robert | 2017-05-04 14:36:25 +0200 | 
|---|---|---|
| committer | Robert | 2017-05-04 14:36:40 +0200 | 
| commit | a75b51bc9b4112d851a38f0e569565ce2c4602c6 (patch) | |
| tree | f64a170a35d3890fe8cead449bdb5317a00d1115 /app/controllers/application_controller.rb | |
| parent | c697909ed7acedf020c695440cdf44b0332dbb35 (diff) | |
| download | chouette-core-a75b51bc9b4112d851a38f0e569565ce2c4602c6.tar.bz2 | |
easy change locale for testing and developping translations
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 5 | 
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 | 
