I use the internationnalization I18n plugin, but not translating 1 part of the information:
In one of my controllers, I have a verification method as follows:
verify :only => [ :destroy, :create, :update, :new, :comment ],
:session => :user_id,
:add_flash => { :error => I18n.t(:'Exceptions.not_logged_in') },
:redirect_to => { :controller => 'main' , :action => 'index' }
However, using I18n.t (: 'Exceptions.not_logged_in') always displays default_locale, in this case, English.
In my application, Application_Controller has a before_filter parameter that sets the locale.
Can someone help me understand and help me find a workaround?
Thank!
PS: I tried to add a call to set_locale before this validation method without success (in my controller)
source
share