Hi I'm looking for some insight in a small problem I have. I allready posted this in the Rails I18n forum, but didn't got any respond, so maybe it was just the wrong forum.
I need multilingual input in my models. Lets say you have a Product model. That product contains title, description and price. The price is allways the same, but the title and description need to be inputted in diffrent languages. I have used the I18n framework build in Rails, so no external plugin and I would like to keep it that way. One idea I was playing with is the following model build: Product ------- id price ProductI18n ----------- id product_id language -> I18n code like EN, BE, FR title description But how do I link those 2 together, so that I can show the product details in the current user language? Is there a way to pass a variable trough the Product association like this: has_one :product_language, :class_name => :product_i18n, :conditions => "language = users_current_language_code" I know I'm on the good track, but I know I'm missing something. thank you for the insight -- Posted via http://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 rubyonrails-talk@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 -~----------~----~----~----~------~----~------~--~---