Change language in tag StartExpand

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
wietster
Forum Members
Forum Members
Posts: 35
Joined: Thu Dec 20, 2007 6:27 pm

Change language in tag StartExpand

Post 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
alby

Re: Change language in tag StartExpand

Post 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
Last edited by alby on Fri Jan 11, 2008 8:08 pm, edited 1 time in total.
wietster
Forum Members
Forum Members
Posts: 35
Joined: Thu Dec 20, 2007 6:27 pm

Re: Change language in tag StartExpand

Post by wietster »

Alby

Thanks a lot that did the trick


Wietster
jd

Re: Change language in tag StartExpand

Post 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!
alby

Re: Change language in tag StartExpand

Post 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
jd

Re: Change language in tag StartExpand

Post 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! :)
Locked

Return to “[locked] CMSMS MLE fork”