On Fri, Jan 2, 2009 at 6:24 AM, bingo bob <[email protected]> wrote:
> So.. my plan is this... > > Just update the page model to include Page.name Page.body AND > Page.bodyFrench, Page.bodyGerman, Page.bodySpanish. I think most people who've done something like this would agree that it's preferable to add a 'language' or 'locale' field to the DB, and keep a single Page.body column. > 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. No, not flags -- what flag would you use for English? Spanish? What language would you be referring to with the Swiss flag? There isn't remotely a mapping of languages <--> countries. Use the language name directly. > 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 Yes, you would want to store the user preference in the session. I'm sure a quick google on "rails session" will turn up lots of examples. And of course reading the ActionController::SessionManagement doc is a good idea :-) HTH, -- Hassan Schroeder ------------------------ [email protected] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

