Hi,
I have managed to use $mle_translation for breadcrumbs and search tags ok but the cms_selflink tag simply takes through the text and does not resolve the variable.
All I see is $mle_translation.previous_page displayed.
If I drop the quotes I get array.previous_page
{cms_selflink dir="previous" label='$mle_translation.previous_page'}
Any suggestions?
Andy.
[solved] cms_selflink tag and multilanguage
[solved] cms_selflink tag and multilanguage
Last edited by andym on Mon Feb 23, 2009 6:13 pm, edited 1 time in total.
Re: cms_selflink tag and multilanguage
I have tried a simple mod to the plugin, but clearly the relevant variables are not defined there.
I put in the following code in place of the current lines:
$Prev_label = $mle_translation.Prev_label; // andym
$Next_label = $mle_translation.Next_label; // andym
$Parent_label = $mle_translation.Parent_label; //uplink andym
And of course in mle lang file:
// Navigation
'Prev_label'=>'Previous page',
'Next_label'=>'Next page',
'Parent_label'=>'Parent page:',
The result is a moan about undefined constant and Next_label is displayed on the screen in the page.
Any clues as to the missing bit of the jigsaw anyone?
A.
I put in the following code in place of the current lines:
$Prev_label = $mle_translation.Prev_label; // andym
$Next_label = $mle_translation.Next_label; // andym
$Parent_label = $mle_translation.Parent_label; //uplink andym
And of course in mle lang file:
// Navigation
'Prev_label'=>'Previous page',
'Next_label'=>'Next page',
'Parent_label'=>'Parent page:',
The result is a moan about undefined constant and Next_label is displayed on the screen in the page.
Any clues as to the missing bit of the jigsaw anyone?
A.
Re: cms_selflink tag and multilanguage
Cracked it! Found the answer in another topic.
Use this approach in the template and it works just fine:
{capture assign='prev_page'}{$mle_translation.Prev_label}: {/capture}
{capture assign='next_page'}{$mle_translation.Next_label}: {/capture}
{cms_selflink dir="previous" label="$prev_page"}
{cms_selflink dir="next" label="$next_page"}
Works a treat.
A.
Use this approach in the template and it works just fine:
{capture assign='prev_page'}{$mle_translation.Prev_label}: {/capture}
{capture assign='next_page'}{$mle_translation.Next_label}: {/capture}
{cms_selflink dir="previous" label="$prev_page"}
{cms_selflink dir="next" label="$next_page"}
Works a treat.
A.