From: "Ragan, Steve" <[EMAIL PROTECTED]>
> Portions that
> pertain to user-specific variables are "renamed" (or purposely misnamed,
if
> you will) TMPL_VAR's so they are not recognized and handled by H::T during
> this pass.
>
> <my_special_VAR NAME=first>
>
> [then]
>
>     $output =~ s/my_special_VAR/TMPL_VAR/g;

Steve, thanks. That might work for me. I'm not sure I'd want to pre-generate
all the pages (and keep them in synch). Since I'm caching my own pages (by
language), I could probably do the ->new, ->output, regex
and ->new_scaler_ref when a page is not in the cache without too much
slowdown on the first display of a page.

The three things I've found that make multi-language processing difficult
with H::T are:

1. One-time evaluation of a template's page-specific vars (so that
subsequent displays can deal only in truly variable evaluations).
2. No way to say <tmpl_include name="constant_text_<tmpl_var name=LANG>"> to
use language-specific text determined at run time.
3. No way to recurse variables which may have been evaluated with text that
contains variables.

#2 and 3 are troubling because, if I can't pull in fragments of a page (for
a language), then I'm likely to use "Locale::Maketext" to provide me with
what may be lengthy fragments. If the fragments contain markup (like a
link), then I'm stuck because the fragment's link will contain an attribute:
"title=<TMPL_VAR NAME=LINK_TITLE_TEXT>" which will not be evaluated.

Feeding ->output back into new H::T objects can get around a lot of this. It
would be a lot easier if those 3 features were available. They don't seem
like they would require too much kludging.

Thanks,
Mark



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to