Forum: Rails I18n Best Practices?

Aab060b3da7fa08ba0b531e2204c6469?d=identicon&s=25 Mitchell Gould (mitch_newbie)
on 2010-08-25 12:55
I understand the practice of using yaml files for language translations
for basic things like labels, links etc.

But for large chunks of text that might contain a lot of markup for
design etc what is the best way to offer sites in many languages?

Is it better to have those layouts done in separate languages?

Thanks
7e565a1681dc0137f43826aa840686af?d=identicon&s=25 Andrés Mejía (Guest)
on 2010-08-25 17:44
(Received via mailing list)
I personally prefer to have separate layouts for big chunks (like the
Privacy Policy, for example), because YAML files become impractical for
strings with more than 3 lines.

I just create policy.en.html.erb, policy.fr.html.erb, etc. This
certainly
introduces some duplication but you can avoid that a bit by creating
partials that contain only the text that needs to be translated and
rendering those partials from a common layout.
This topic is locked and can not be replied to.