[Rails] Re: routing Translated Paths
[SOLVED] found the gem rails-translate-routes ... so easy !
https://github.com/francesc/rails-translate-routes
Le samedi 5 janvier 2013 20:07:30 UTC+1, Erwin a écrit :
Happy new 2013 ! we're still on our nice blue planet !!I am using translated path in my project, working finescope '/:locale' do...scope(:path_names => { :new => I18n.t(:new, :scope => :paths), :edit => I18n.t(:edit, :scope => :paths) }) doresources :contacts, :only => [:new, :create], :path => I18n.t(:contacts, :scope => :paths)resources :portfolios, :only => [:show], :path => I18n.t(:portfolios, :scope => :paths)resources :craftworks, :only => [:index, :show], :path => I18n.t(:craftworks, :scope => :paths)resources :posts, :only => [:index, :show], :path => I18n.t(:posts, :scope => :paths)endstarting the app with the default locale being :fr, I get all the routes translated ... BUTwhen a user switch the locale to :en, then the resources paths are translated to english.. but not the path_names ::new and edit are still in french .. what could be wrong ?thanks for feedback
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/FUtdNLNxdjQJ.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home