From 069187aee03481a5b802fe82a7c1fad26a66a876 Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 19 Feb 2009 21:57:55 +0100 Subject: setting the locale so clean you could eat from it --- app/controllers/application_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b481317..3ee43d4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -9,4 +9,12 @@ class ApplicationController < ActionController::Base # Scrub sensitive parameters from your log filter_parameter_logging :password, :password_confirmation + + before_filter :set_locale + + protected + + def set_locale + I18n.locale = params[:locale] || :en + end end -- cgit v1.3