Fernando Perez wrote:
[...]
> Actually it is a bit painful to implement, as it means removing all the
> text from views and putting it?... well I don't really know.
This is why I use gettext (or faster_gettext): the phrases themselves
*are* the keys, so the views look like
_('Welcome to the site, %{user}!') % {:user => user}
rather than
get_message(:site_welcome_message, user)
This way, the view files stay legible, and the application is usable
even if no locale is set. The translations go in .po files, which are
an industry standard, and so translators and CAT software can be
expected to know what to do with them.
>
> The yaml files are okay for short sentences, but how do you handle
> localizing big chunks of html?
[...]
PO files are meant to deal with arbitrarily long strings of text.
Again, the gettext solution is best here.
Best,
--
Marnen Laibow-Koser
[email protected]
http://www.marnen.org
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---