You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gunnar Wolf <gw...@gwolf.org> on 2006/08/09 23:09:02 UTC

I18N and non-literals

While building an I18N-able site, I noticed Embperl's [= =] facility
seems to work only for literals, and does not work with data generated
by expression - this means:

[= string =]

will be properly translated to whatever message I defined for
'string', but

[$ foreach $var qw(string chain thing) $]
[= $var =]
[$ endforeach $]

will only appear as:

$var
$var
$var

Why is it so? Is there a way I can change this setting? I know I can
call [+ $req_rec->gettext($var) +] instead, but it loses all the
beauty ;-)

Greetings,

-- 
Gunnar Wolf - gwolf@gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: I18N and non-literals

Posted by Gerald Richter <ri...@ecos.de>.
> 
> [$ foreach $var qw(string chain thing) $] [= $var =] [$ endforeach $]
> 
> will only appear as:
> 
> $var
> $var
> $var
> 
> Why is it so? Is there a way I can change this setting? I 
> know I can call [+ $req_rec->gettext($var) +] instead, but it 
> loses all the beauty ;-)
> 

At the moment there is no build in way to change this. Basicly it should not
be hard to extent the EmbperlBlocks syntax (see
Embperl/Syntax/EmbperlBlocks.pm) to do what you want.

Gerald


 
** Virus checked by BB-5000 Mailfilter ** 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org