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
First question: Is this the usual way for crating a multilingual
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 ?