Markus Spring wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Sarfy wrote:
| Hi folks,
|
| I lack multiple language support in HTML::Template.
..SNIP..
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.

Hi Markus,

Since Sam has now pulled out the cache key generation into it's own
function, much of the patch that I wrote 2 years ago is no longer really
needed.  You can override the _cache_key in your subclass and have it
include the filter args in the generation of the cache key.

The only part that would still be needed is the filter args support
(which was a very small part of the patch).

For those interested in the thread discussing this stuff:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg00661.html

Mind you that was over 2 years ago, so I wouldn't recommend using that
patch since it is against 2.5 (or 2.4, I can't remember).  Adding the
filter ags support would be trivial to 2.7 with the availability of the
new _cache_key method.

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

I no longer need support for this, but feel free to strip the old patch and make it work with 2.7. It should be much simpler, and maybe a worthwhile addition to HTML::Template in the next version.

Cheers,

Cees

ps I originally sent this earlier today, but from the wrong account, so the original message is sitting in the moderator queue. Not knowing how long it will sit there, I thought I would resend it. Hopefully the duplicate will be denied by the moderator.


------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to