Raphael Schmid
2006-May-02 20:35 UTC
[Rails] Mapping/Routing: connecting ?lang=de to blah.org/de?
Hi List, how would you modify routes.rb to get something like http://example.org/de/controller/action instead of http://example.org/controller/action/?lang=de ? (Using the Ruby-GetText method for internationalization, which allows you to specify the sites'' language in the lang param) I''d be grateful for any hints that you might have! Regards, Raphael -- Posted via http://www.ruby-forum.com/.
Charlie Bowman
2006-May-02 20:42 UTC
[Rails] Mapping/Routing: connecting ?lang=de to blah.org/de?
I''m not sure about the international part of your url, but I would assume you would change this just I many have changed the paginated urls. Here is a blog posting of mine that details how to change the paginated urls to work just as you are asking. http://www.recentrambles.com/pragmatic/view/45 Charlie Bowman www.recentrambles.com On Tue, 2006-05-02 at 22:35 +0200, Raphael Schmid wrote:> Hi List, > > how would you modify routes.rb to get something like > > http://example.org/de/controller/action > > instead of > > http://example.org/controller/action/?lang=de > > ? > > (Using the Ruby-GetText method for internationalization, > which allows you to specify the sites'' language in the > lang param) > > I''d be grateful for any hints that you might have! > > Regards, > Raphael > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060502/af3dbb31/attachment.html
Raphael Schmid
2006-May-02 20:52 UTC
[Rails] Re: Mapping/Routing: connecting ?lang=de to blah.org/de?
Raphael Schmid wrote:> Hi List, > > how would you modify routes.rb to get something like > > http://example.org/de/controller/action > > instead of > > http://example.org/controller/action/?lang=de > > ? > > (Using the Ruby-GetText method for internationalization, > which allows you to specify the sites'' language in the > lang param) > > I''d be grateful for any hints that you might have! > > Regards, > RaphaelOkay, as usual, here''s the solution for fellow journeymen (thanks a heap to Geffy!) map.connect ":lang/:controller/:action/:id", :defaults => { :lang => ''de'' } -- Posted via http://www.ruby-forum.com/.