Locale::Maketext is definitely great, here's what I do besides

  tempalet.en
  template.fr
etcetc based ont he MT object but in TT cod itsefl i simply get a mt  
object and passit:

   lh => $lh,

[% lh.maketext('Great googly moogly, why did you kill me [_1]?', you) %]

It's let me have great success in easily making things localized  
without having to code a bunch of locale logic. There's a ton of other  
reason too.

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?
>
> I've seen a plugin Template::Multilingual, but it doesn't seem to  
> fit my needs, because I would NOT like to write text in multiple  
> languages in one Template file. This is not practical for  
> transaltions and maintenance.
>
> I would not like to fetch the strings from the database either,  
> because this obfuscates the strings
>
> In an ideal world, would like someting just like i18n for Template- 
> Toolkit. The original text should reside in the template itslef  
> while the translations would come from a PO file or something  
> similar. There would be very little line noise in the Template file.  
> Therefore a source filter would be good.
>
> Would anyone know of a simple and practical solution for this? A  
> Template-Toolkit filter perhaps?
>
> Your help would be greatly appreciated here.
>
> Cheers,
>
> Ayhan (trinculo)
> _______________________________________________
> 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

Reply via email to