Hi blessan,
There is a new insert tag to do that : {{label::*}}
In /system/langconfig.php define yours vars for each language :
Code:
if ($GLOBALS['TL_LANGUAGE'] == 'de')
{
$GLOBALS['TL_LANG']['My_Form']['My_Label'] = 'Apfel';
}
if ($GLOBALS['TL_LANGUAGE'] == 'fr')
{
$GLOBALS['TL_LANG']['My_Form']['My_Label'] = 'Pomme';
}
else
{
$GLOBALS['TL_LANG']['My_Form']['My_Label'] = 'Apple';
}
Replace My_Form and My_Label by what you want.
And use the insert tag like that :
{{label::My_Form:My_Label}}
You can do that in form to have key/value data :
Code:
if ($GLOBALS['TL_LANGUAGE'] == 'de')
{
$GLOBALS['TL_LANG']['My_Form']['My_Label'] = array('Apfel','Wahl eines Apfels');
}
if ($GLOBALS['TL_LANGUAGE'] == 'fr')
{
$GLOBALS['TL_LANG']['My_Form']['My_Label'] = array('Pomme','Choisissez une pomme');
}
else
{
$GLOBALS['TL_LANG']['My_Form']['My_Label'] = array('Apple','Choose an apple');
}
And use the insert tag like that :
{{label::My_Form:My_Label:0}} //Apple
{{label::My_Form:My_Label:1}} //Choose an apple
Bookmarks