Forum: Ruby on Rails Multilingual resources

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E69df6f96ddf28dd4fde68649a17d071?d=identicon&s=25 Roland Venesz (steerio)
on 2007-07-05 16:10
Hey!

We're trying to create multilingual resources, i.e. ones that can have a
language selector in the URL - to have search engines index all the
language versions of resources. The optional solution would be:

/foobars/123.en.html
/foobars/123.fr.html, etc..

Is this possible somehow using ordinary Rails routing (that is without
external rewrite rules, etc)? We only need this feature for HTML pages -
so /foobars/123.xml would return all languages as they're all part of
the resource.

For one or more reasons we've already ruled out the following URL
schemes:

/en/foobars/123
/foobars/en/123

These lead to resource duplication though this whole thing is about
different versions/views of the same resource. When creating or editing
said resources our users won't edit them one language at a time but as a
whole. These latter schemes are also problematic if we consider REST web
services.

Any help will be appreciated! Thanks,
Roland Venesz
This topic is locked and can not be replied to.