Hi Sascha,

Sascha Frinken schrieb:
> Is this the expected behaviour? If not I will open a bug report for it.
> 
> I am expecting it to return the translation of each word.

as you can see in the template component docs, only literal strings are 
allowed within translation tags.

http://ezcomponents.org/docs/api/trunk/Template_EBNF.html#translations

You can use a switch to achieve what you want:

{tr_context "existing"}
{use $words=array( 'hello', 'world' }
{foreach $words as $word}
   {switch $word}
     {case "hello"}{tr "hello"}{/case}
     {case "world"}{tr "world"}{/case}
   {/switch}
{/foreach}

Regards,
Andi


-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to