Rails and Stuff at Abel killed Cain

Ruby on Rails and other Webdevelopment

Posts Tagged ‘ I18n ’

Rails Internationalization (I18n) API is a great way to start with multilanguage pages.

However, i found it quite horrible to specify my translations inside if the corresponding #lang.yml/.rb files etc.

After searching a bit, i found globalize2 – a nice plugin that creates localization-models for each model you want to translate.

quite all you have to add to your code is

1
2
3
class Post < ActiveRecord::Base
translates :title, :text  #this over here
end

Quite nice, but: a new sql-request for each model you want to translate – that sucks!
[More]