Hello Redd,

Could you please explain how using the session to store the preferred
language is going against 'RESTfullnes'.
Someone copying and pasting an url would just see the page in the
default language, not really a problem there, except choosing the
right language.
If you advise to pass the language in the url everytime, I think it
would be against the clean url Rails produces.

I think in the long time, you could find yourself with very cluttered
urls full of parameters, which would be a big step back.

Geoffroy Gomet


On Oct 4, 1:20 pm, "Redd Vinylene" <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 3, 2008 at 2:51 PM, Karel Minarik <[EMAIL PROTECTED]> wrote:
>
> > Hello Iain,
>
> > *please* don't advise people to use `session` for setting locale! That
> > is an unfortunate choice by the official i18n demo app and completely
> > breaks RESTfullnes of anything. (ie. completely breaks even such
> > simple thing like sending someone a URL and expecting that she'll see
> > the same thing.)
>
> > One should set locale from params, hostname, accepted-language header,
> > whatever, just *not* session.
>
> How? Like this?
>
> def set_locale
>  I18n.locale = params[:locale] if params[:locale]
> end
>
> --http://www.home.no/reddvinylene

--~--~---------~--~----~------------~-------~--~----~
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