Rails: set locale for a specific path -


i want specify locale specific path.

in whole application have default local e set :es

 config.i18n.default_locale = :es 

that works in normal fashion whole application, want know how can specify specific locale set of paths...

i integrated third party application called maily_herald, in order make it's paths available application have add line routes.rb file

mount mailyherald::webui::engine => "/maily_webui" 

the problem there not translations locale :es, not work properly... want let paths under /maily_webui have locale :en third party application work in english while application still work in :es

any idea how this?

class applicationcontroller < actioncontroller::base   .....   before_filter :set_locale     def set_locale     if request.fullpath == "some_path"       i18n.locale = :some_locale     else       i18n.locale = params[:locale] || i18n.default_locale     end   end  end 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -