Forum: Rails I18n Best Practices?

Posted by 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
Posted by 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.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.