Page 1 of 1

Change language in tag StartExpand

Posted: Fri Jan 11, 2008 6:25 pm
by wietster
Hello,

I have a strange problem with a tag

I used the startExpand tag and want to auto change the expand_text depending on the language page your on.

{startExpand id="expand" expand_text="$mle_translation.klik_omlaag"} i also try it with {startExpand id="expand" expand_text="{$mle_translation.klik_omlaag}"}

but the i get this :  Array.klik_omlaag

When i put {$mle_translation.klik_omlaag} above the startExpand text it works perfectly But inside the tag it does'nt work
any Suggestions how to fix this

Thanx

Wietster

Re: Change language in tag StartExpand

Posted: Fri Jan 11, 2008 8:06 pm
by alby
wietster wrote: I used the startExpand tag and want to auto change the expand_text depending on the language page your on.

{startExpand id="expand" expand_text="$mle_translation.klik_omlaag"} i also try it with {startExpand id="expand" expand_text="{$mle_translation.klik_omlaag}"}
From smarty manual, the correct mode with variables is with backtick (`).
Try with  ;):

Code: Select all

{startExpand id="expand" expand_text=`$mle_translation.klik_omlaag`}
Alby

Re: Change language in tag StartExpand

Posted: Sun Jan 13, 2008 11:35 am
by wietster
Alby

Thanks a lot that did the trick


Wietster

Re: Change language in tag StartExpand

Posted: Thu Jan 24, 2008 2:42 pm
by jd
Hi,

I have a similar question:
How can I edit the following:

{anchor anchor='main' text='^ Top'}

When I put it as:

{anchor anchor='main' text='^ {$mle_translation.top}'}
or
{anchor anchor='main' text='^ `$mle_translation.top`'}
or
{anchor anchor='main' text='^ $mle_translation.top'}

It doesn't work. I have defined the "top" string in my lang file, but I can't make it to work.
Thanks in advance!

Re: Change language in tag StartExpand

Posted: Thu Jan 24, 2008 4:46 pm
by alby
jd wrote: {anchor anchor='main' text='^ Top'}
Use {anchor anchor='main' text=`$mle_translation.top`} and in lang file:
'top' => '#005E What you want',

Alby

Re: Change language in tag StartExpand

Posted: Fri Jan 25, 2008 9:32 am
by jd
10x a lot alby!
I just discovered the MLE fork a few days ago and it is really useful since it solved issues I have had with bilingual websites for years :)

10x a lot again! :)