-----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-----
begin:vcard fn:Markus Spring n:Spring;Markus org;quoted-printable:RGU-UW11;Referat f=C3=BCr Gesundheit und Umwelt/Department of Health and Environme= nt adr;quoted-printable:;;Bayerstr. 28a;M=C3=BCnchen;;D-80335;Germany email;internet:[EMAIL PROTECTED] title:Baurat tel;work:+49 89 233 47716 tel;fax:+49 89 233 47705 tel;cell:+49 163 87 51110 x-mozilla-html:FALSE version:2.1 end:vcard