On Jul 16, 2008, at 6:43 PM, Ayhan Ulusoy wrote: > > I use Template-Toolkit for the web and I am quite happy with it. > > Now, I will have to come up with a way to render the template in > > multiple languages. > > > > I've looked at several CPAN modules such as i18n and > > Locale::Maketext::Lexicon, . Both function with lexicons and both > > use PO files. i18n is a Perl source filter that wraps around the > > latter. And they seem to be very good when you deal with strings > > from within a Perl program. > > > > But what about Template-Toolkit? > > > > Would any of you know of a cool way of doing this just like i18n > > does for Perl? Is there a Plugin or a filter for Template-Toolkit? > > > >
Some cool ideas from Eric and Lee, although this: [% lh.maketext('Great googly moogly, why did you kill me [_1]?', you) %] Kinda rubs me the wrong way because it seems like *another* language ;) As an exercise I wonder how many lanugages are needed to render the above... PERL, probably SQL, TT, Maketext, HTML, likely CSS and/or Javascript, not to mention English! Horror. Anyway... what would be really cool is if some of the people here using TT in i18n-type contexts could describe how and what they are doing because I am for sure going to have to do this in the next months and I'd like to pick from the genius of others :) So in addition to the methods from Eric: http://mail.template-toolkit.org/pipermail/templates/2008-July/010293.html and Lee: http://mail.template-toolkit.org/pipermail/templates/2008-July/010292.html there's also this from PM: http://www.perlmonks.org/?node_id=466269 Also in this PM thread are some great approaches too. I hope this helps somebody looking for these solutions. Tosh -- McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/ _______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates