Hi Iain,

> I see your point.

well, I think the REST principle: "every resource represenatation
should be identifiable by an unique URL" is really something one
should *never, ever* break. It is the backbone of internet. (And
probably everyone of us saw some unbelievably ugly .NET/PHP/etc apps
which are totally broken in this sense. The bigger the app, the worse,
usually.)

> How do you maintain the chosen locale? If the locale
> comes from the params, it doesn't only produce ugly urls, but you also
> need some way to add it to every link you generate.

Yes, that is true. Usually it is done by prefixing the locale in URL (/
en/some/resource, /es/some/resource) and people are really used to it.
Raul's solutions looks very nice.

> The other option is using the hostname (i.e. a subdomain), but you're
> not always able to use this (if you're not the only website on one
> domain or if you're using https with a valid certificate).

Yes, I like the hostname option very much (meaning application.com vs
application.de, etc), and it is a preferred way now for me for content-
oriented projects. I did it like that in the demo app and provided
guide how to setup it locally with /etc/hosts. As stated in the demo
app README, search engines love this separation as well (for obvious
reasons).

Of course, there are edge cases, where it's tricky.

> Rails seems to have an answer to it, called default_url_options[1],

Wow, I didn't knew about it, guess Rails is really stretched now. This
would be of course *absolutely* awesome, because it could solve the
most trivial scenario: prefixing locale into every URL, and do that
transparently. This is something we should investigate. Could you
submit a ticket at Lightouse about this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rails-i18n" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rails-i18n?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to