On Tue, Aug 3, 2010 at 11:06 AM, Pale Horse <li...@ruby-forum.com> wrote: > Robert Walker wrote: >> Pale Horse wrote: >>> My client has a translator and wants a lot of his page content to be >>> translated into 6 different languages. >>> >>> When a user selects their language on the front end, it need to alter >>> the Page content, Page title and Navigation title. >>> >>> I've made alternate columns in my database for the other languages. >>> Although it's messy, it is what the client requested. >>> >>> So I assume I'll need an action in my application controller to set >>> session data and then render the appropriate content front-end. >>> >>> Now, can someone give me any help regarding this process, or has anyone >>> come across this before? >> >> First I have to ask if you have read the Rails Internationalization >> (I18n) guide: >> >> http://guides.rubyonrails.org/i18n.html > > I've not read this, though I imagine it to be overkill for my purposes. Really? You should read it. That's how rails works with i18n. Overkill would be to implement a different solution when a lot (and I mean a LOT) of people already worked it out in a really nice way. If you think that translate an application to 6 different languages doesn't need an elegant and easy-to-maintain solution, then you're in trouble.
> >> Or is your question specifically related to how to store the user's >> preferred language. > > What I really want is to render a different column based on the session > data. If you want to do that, it's a different story. You don't need to ask anybody to do that, just make a case/when structure and you'll be on your way. -- Leonardo Mateo. There's no place like ~ -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.