I,m using Globalize2. I'd like to populate DB with db:seed for different locales: en, de and ru. Is there a better solution then:
categories = [{ :en => 'Health & Beauty', :ru => 'Красота и здоровье', :de => 'Beauty & Gesundheit'},
{ :en => 'Baby', :ru => 'Детские товары', :de => 'Baby' }]
categories.each_index do |i|
I18n.locale = 'en'
Category.create(:name => categories[i][:en])
I18n.locale = 'ru'
cat = Category.find(:last)
cat.name = categories[i][:ru]
cat.save
I18n.locale = 'de'
cat.name = categories[i][:de]
cat.save
end
?