Locale::Maketext::Lexicon can do .po files, and it now has special TT
and YAML formats although I've got to say I'm not a fan of the gettext
style _(thingy)... too ambiguous but that's just me :)
What I do, .po or not, is pass in a lh so my templates look like this:
[% lh.maketext('Hello World my name is [_1]', name) %]
Your lexicon can be a normal hash, a .po, a tied DB connection, CLDR
XML lookup, etc etc... (and parsers to extract phrases just need to
look for 'lh.maketext' instead of "insert arbitrary single character
ambiguator here"')
Also I recommend Locale::Maketext::Utils for more methods and
flexible, well, utilities (even if it doesn't address your initial
question ;p)
It has all made my life much easier and apps available to dozens of
languages without mush fuss.
On Oct 28, 2008, at 6:35 PM, Thomas Thurman wrote:
I know about Template::Multilingual, but is there any plugin or filter
which can take a standard .po file (from Locale::PO, I imagine) and
run
the text in a tt2 file through it? If not, would anyone mind if I
wrote
one?
Thomas
--
Thomas Thurman, tthurman at gnome, http://blogs.gnome.org/tthurman
The troll catches your treasure and scurries away out of sight.
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates