On Fri, 29 Oct 2004, Peter Valdemar M�rch wrote:
> I use gettext, and so I've created this filter:
>
> my $gettextFilterSub = sub {
> my ($text_ref) = @_;
> $$text_ref =~
> s/<gettext\(\"([^\"]*)\"\)>/gettext($1)/ge; # To satisify xgettext: "
> };
You could also use HTML::Template::Expr and setup a function called
gettext:
<tmpl_var expr="gettext('Hello World')">
It's more verbose but it will work better with the cache system. If
you want your syntax you could combine the two:
my $gettextFilterSub = sub {
my ($text_ref) = @_;
$$text_ref =~
s/<(gettext\([^)]\))>/<tmpl_var expr=$1>/g;
};
-sam
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users