logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: language support: msg#00054

Subject: Re: language support
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Sarfy wrote:
| Hi folks,
|
| I lack multiple language support in HTML::Template.

My way to do it is as following:

1 Have Templates in one basic language
2 Use Locale::Maketext as basic functionality to retrieve localized text strings
3 Use template filters during load_tmpl to localize text between tags as well as
text in certain tag attributes, especially alt="" and title="". Replacement
strings come from Locale::Maketext
4 localize your variable values from inside your program before submitting those
as template variables

3 is done by subclassing HTML::Template to recognize filter arguments as a part
of the cache key (idea and code from Cees Hek), so that localization of the
templates is done once before caching.

If there is interest for this solution, I could pack up the code but it might
take some days as I am in holidays.

Kind regards

Markus Spring
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBLzgjxxUzQSse11ARAgPeAJwKUz/4IVcvGB1++tfrQlyozqUQpgCgjKki
XLiJfJdKBow3zrpDNsP3oqQ=
=I11g
-----END PGP SIGNATURE-----

Attachment: springm.vcf
Description: Vcard

<Prev in Thread] Current Thread [Next in Thread>