On Tue, Aug 24, 2004 at 12:07:32PM -0400, Sam Tregar wrote:
> On Tue, 24 Aug 2004, Martin Sarfy wrote:
> 
> > Using <TMPL_IF lang=""> construct isn't appropriate for several reasons:
> > 
> >   -- $lang is not accessible in <TMPL_LOOP> context
> 
> Use global_vars and it will be.

It's good that global_vars is not set by default, clean namespace in 
<TMPL_LOOP> is advantage and I don't want to turn it on only because
translations.

> >   -- it's too clumsy for manual writting
> 
> I don't understand what you mean by this.  If you consider
> HTML::Template's syntax to be too clumsy then why are you using it?

Syntax is perfect because many designers are able to learn it
and work of programmer and designer can be splitted, now I'm talking
about work of translator, who needs some easy to understand/use syntax, 
he cannot write <TMPL_IF VAR="lang"> logic for every label he
wants to translate.

> >   -- <TMPL_IF> is not 'system' solution, it cannot handle e.g.
> >      substitution of similar languages or so.
> 
> You can handle that in your code.  I'm certainly not going to add an
> exhaustive list of languages and their synonyms to HTML::Template!
> 
> > Or should I use GNU gettext in some way?
> 
> Possibly.  I've seen it used in similar situations, but I've never
> used it myself.

I can't imagine how to use it, how to enclose string in template file
and how to call gettext() function (this has to be called from within 
HTML::Template code).

I think ability to write templates in several languages is common
requirement, so common that built-in support in templating engine should 
be considered. 


-- 
Martin Sarfy


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to