Skip to content

How To: Redirect with locale after authentication failure

carlosantoniodasilva edited this page Feb 19, 2011 · 5 revisions

Set your locale & Make your default_url_options a class method in your ApplicationController

def set_locale
  I18n.locale = params[:locale]
end

def self.default_url_options(options={})
  options.merge({ :locale => I18n.locale })
end
Clone this wiki locally