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