Micro Focus Expert
Micro Focus Expert

(SM) Support Tip: How to translate phase change activity.

One of the things that need to be translated manually in a localized system are the activities. The following steps will help to translate the phases in the Change Phase activity description for the incidents:

1.    Create a ScriptLibrary with name “translate_phase” and add the following code. In this case, the function in the ScriptLibrary will receive 3 parameters, but the function can be adjusted depending on the requirements:

function translate(phase, module, table){
var strConcat;
strConcat = phase+";"+module+";"+table;
return system.functions.scmsg(""+strConcat+"","local:WorkflowPhase")

2.    After creating the Script, the activities need to call it in order to translate the phase:
2.1.    Go to the database manager and look for the activityactions table.
2.2.    Then in the Name field, type “Save Activities” and in Table field type “incidents”.
2.3.    Translate the text under Name column and add the following code under Description:
{"Cambio de Fase de  \"" + jscall("translate_phase.translate",nullsub(current.phase in $L.file.save,"NONE"), "Incident","probsummary" ) + "\" a \"" + jscall("translate_phase.translate",nullsub(current.phase in $L.file,"NONE"), "Incident","probsummary")+"\""}
2.4.    The translated text is done based on the OOB information, but it can be adjusted. The activity will look like:


NOTE: This example is translating one activity so it has been replaced. If the system uses multilanguage, there should be one activity for each language, and the condition should be adjusted to use the current user language.

Labels (1)
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.