Use this script to set the value and comment of an existing label only if this label not exist in a particolar language. You can use it on fly by code whitout use of developer tool.
In my case i can set more than 200+ labels traduction in a couple of minutes.
void modifyLabel(LabelId _labelId, str _srcLanguage, str _trgLanguace, str _trgString, str _trgComment = '')
{
SysLabel srcLang = new SysLabel(_srcLanguage);
SysLabel trgLang = new SysLabel(_trgLanguace);
;
_labelId = "@" + _labelId;
if (!srcLang.exists(_labelId) || !srcLang.extractString(_labelId))
{
warning(strfmt("L'etichetta %1 non esiste nella lingua %2", _labelId, srcLang.languageId()));
return;
}
if (trgLang.exists(_labelId) && trgLang.extractString(_labelId))
{
warning(strfmt("L'etichetta %1 esiste già nella lingua %2 con il valore %3", _labelId, trgLang.languageId(), trgLang.extractString(_labelId)));
return;
}
cnt += trgLang.modify(_labelId, _trgString, _trgComment ? _trgComment : srcLang.extractComment(_labelId));
info(strFmt("Modificata etichetta %1 e impostato il testo %2 in lingua %2", _labelId, _trgString));
}
This script can semplify the same action but in more than one language, example in my case the traduction of en-us and en-gb is the same.
void modifyLabelMultipleLanguagese(LabelId _labelId, str _srcLanguage, container _trgLanguaces, str _trgString, str _trgComment = '')
{
int i;
str trgLanguace;
;
for(i=1;i<=conlen(_trgLanguaces);i++)
{
trgLanguace = conpeek(_trgLanguaces, i);
modifyLabel(_labelId, _srcLanguage, trgLanguace, _trgString, _trgComment);
}
}
Iscriviti a:
Commenti sul post (Atom)
AX 2012: The request was aborted: Could not create SSL/TLS secure channel
The error you're encountering, "The request was aborted: Could not create SSL/TLS secure channel," can occur due to various re...
-
Ussally you have to save a report to an output file for example store it or send it over mail. Here an example to save a report into Excel...
-
A simple way to export a data entity, using the powerful data management framework. You need a definition group, where the entity is mapped ...
-
NumberSeq numberSeq; InventTransferTable inventTransferTable; InventTransferLine inventTransferLine; InventDim inventDim; ; ttsbegin; ...
Nessun commento:
Posta un commento