Hi community
For a Project i load a "product" from the db. The product itself has different names in different languages.
We are using Joomla Multilanguage and its all up and running (also Translations inside Chronoforms).
Because of the fact that the owner has NOT to handle translations or anything inside Chronoforms Config each product has fields for its title so a product has:
name_de; name_en; name_fr fields. actually i load the name_de field and combine it with a price field in PHP:
Any idea how to build the PHP block with variable fieldnames based on the selected language?
kind regards
For a Project i load a "product" from the db. The product itself has different names in different languages.
We are using Joomla Multilanguage and its all up and running (also Translations inside Chronoforms).
Because of the fact that the owner has NOT to handle translations or anything inside Chronoforms Config each product has fields for its title so a product has:
name_de; name_en; name_fr fields. actually i load the name_de field and combine it with a price field in PHP:
$packs = $this->get('read_packages');The $pack[Package][name] is the fieldname that should be variable...
$edited = array();
foreach($packs as $pack){
$edited[$pack[Package][id]] = $pack[Package][name] . ' CHF ' . $pack[Package][price] . '.-';
}
return $edited;
Any idea how to build the PHP block with variable fieldnames based on the selected language?
kind regards
Nevermind i had a idea that worked.
I copied the above code for each lang and edited the fieldname.
Next i removed the placeholder for the {var:myPhpFunction} from the select list and replaced it by a language var
and in the language var i setted up the
PACK={var:myPhpFunction_de}
PACK={var:myPhpFunction_en}
...
its working like that
I copied the above code for each lang and edited the fieldname.
Next i removed the placeholder for the {var:myPhpFunction} from the select list and replaced it by a language var
and in the language var i setted up the
PACK={var:myPhpFunction_de}
PACK={var:myPhpFunction_en}
...
its working like that
This topic is locked and no more replies can be posted.