Hi Bingo Bob,

from a browsers perspective you'Re better off not showing a page where
people pick the language... they made that decision a while ago when
they bought their machine, OS and webbrowser.

what you want to do it use the HTTP Headers you can get which language
the users perfer to have their content in.... in case of doubt present
a default version in the language you want to serve by default and let
them change language easily (that's called content negociation).

Here's a link to the small language selector controller I use when I
need that (it uses Gloc to determine if the sites accepts such
language):
http://demo.m2i3.com/source/ror/locale_selector_controller.rb

then I make my routes to include the language at its soo and localize
the who url (so different pages with different langauges are indexed
properly).

Hope this helps

Jean-Marc
http://m2i3.com/


On Jan 2, 9:24 am, bingo bob <[email protected]> wrote:
> I've got a nice little site running which I rather like. All's running
> tickety boo (the site is English language). It has a rudimentary CMS
> with it, basically I have a page model such that Page.name and Page.body
> exist. I simply allow the user to enter the page name and body and I
> throw the content onto various pages around the site. As I say works
> well.
>
> Next feature - I'd like to do the site in French, German and Spanish as
> well.
>
> So.. my plan is this...
>
> Just update the page model to include Page.name Page.body AND
> Page.bodyFrench, Page.bodyGerman, Page.bodySpanish.
>
> I'd then update my admin views to show text areas for all the new
> languages and allow the user to update them all, that'd work fine I
> think.
>
> How do I implement this though from a browser perspective?
>
> I'd like to put a challenge on the front page of the asking for which
> language the user wants the site. Maybe flags int he time honoured sense
> or whatever.
>
> Thing is though, How do I store this information so that my app knows
> which page to display for this user. I;ve heard of Sessions? but haven't
> used them yet, is that how to do it, any tips or code fragment to get me
> started would be grately apprecaited. wer wer
>
> cheers,
>
> bb
> --
> Posted viahttp://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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to