In rails application I have two models: Food
and Drink
.
Both food and drink have a name
, which has to be stored in two languages.
How do I better realize translations for theese tables?
First solution I realized was to replace name
column with name_en
and name_ru
.
Another solution is to encode with YAML hash like { :en => 'eng', :ru => 'rus' }
and store yaml as a name.
What would you recommend, assuming content is not static?
Maybe there's good article?