Hi list, I have a more conceptual question. I want to create a multilingual web application. I have the models "product" and "product_name". Each "product_name" contains a product_id, a language_id and a string value for name. First question: Is this the usual way for crating a multilingual application? Second question: Should I save the user preferred language (the user is anonymous) in the cookies? If yes how should I define ''name'' in my active record Product? Say, I want to write following. p = Product.find(123) puts p.name # the name for the preferred language How should I define ''name'' in app/model/product.rb ? Thanks, peotry --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi list, I found the answer. http://www.globalize-rails.org On Aug 6, 3:08 pm, poetry <ferhata...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Hi list, > > I have a more conceptual question. I want to create a multilingual web > application. I have the models "product" and "product_name". Each > "product_name" contains a product_id, a language_id and a string value > for name. > > First question: Is this the usual way for crating a multilingual > application? > Second question: Should I save the user preferred language (the user > is anonymous) in the cookies? If yes how should I define ''name'' in my > active record Product? > Say, I want to write following. > > p = Product.find(123) > puts p.name # the name for the preferred language > > How should I define ''name'' in app/model/product.rb ? > > Thanks, > peotry--~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 8/9/07, poetry <ferhatayaz-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > Hi list, > > I found the answer. > > http://www.globalize-rails.orgIts not the only answer. There must be at least 7 different ways of internationalising your web app in Rails/Ruby now. Globalise is a strong contender, but there are strengths to the others depending on your needs. There is no straight answer to what you should be doing. But most sites on the internet would use a combination of default==HTTP header locale, and user selectable options in their profile.> > On Aug 6, 3:08 pm, poetry <ferhata...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote: > > Hi list, > > > > I have a more conceptual question. I want to create a multilingual web > > application. I have the models "product" and "product_name". Each > > "product_name" contains a product_id, a language_id and a string value > > for name. > > > > First question: Is this the usual way for crating a multilingual > > application? > > Second question: Should I save the user preferred language (the user > > is anonymous) in the cookies? If yes how should I define ''name'' in my > > active record Product? > > Say, I want to write following. > > > > p = Product.find(123) > > puts p.name # the name for the preferred language > > > > How should I define ''name'' in app/model/product.rb ? > > > > Thanks, > > peotry > > > > >--~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---