Re: [htmltmpl] language support
Brought to you by:
samtregar
From: Martin S. <sa...@ic...> - 2004-08-27 13:40:13
|
On Fri, Aug 27, 2004 at 03:33:23PM +0200, Markus Spring wrote: > -----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. Thanks, I'll do it this way. Happy holidays Martin |