Skip to main content

Translations

Translations can be customized for each language and module installed. To modify or insert a new translation use the method:

SDK::setLanguageEntry($module, $langid, $label, $newlabel);

$module : the module name that contains the string
$langid : the code of the language (e.g. “en_us”, “it_it”)
$label : the label (eg.e.g. LBL_TASK_TITLE)
$newlabel : the translation of the label

If the label already exists for the chosen module and language, it will be replaced. As a module you can specify "APP_STRINGS" to insert a global translation or "ALERT_ARR" to make the translation available in JavaScript files. To load a string simultaneously in multiple languages, the method is:

SDK::setLanguageEntries($module, $label, $strings);

$module : the name of the module
$label : the label
$strings : associative array with the translations (eg. array(“it_it”=>str1, …))

To remove a translation:

SDK::deleteLanguageEntry($module, $langid, $label = NULL);

$module : the name of the module
$langid : the code of the language
$label : the label (if NULL, all the strings that match)