I have a before filter which localizes strings based on params[:lang]. If :lang is "de" I want my urls to look like this: mysite.com/de/home/show/1 If it''s empty, localization defaults to english and I want my url to look like this: mysite.com/home/show/1 I''ve got the following partial rendered on every page to toggle languages: <%= link_to "DE", :lang => "de" %> <%= link_to "EN", :lang => nil %> Can I cater for both urls with one route? At the moment, I can only get this working with these two: map.connect '':lang/:controller/:action/:id'' map.connect '':controller/:action/:id'' -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---