Translation of process maps
Configuration
By default, the base file is located in the folder generated by the client server (~path to the server /plusworkflow/wtpwebapps/server name klienckiegol/bundles/xpdl)
To change the folder in which the translations are located, proceed as follows. You should open the system parameters tab (Administration -> System configuration -> System parameters). Where in the General panel to the PATH_TO_XPDL_BUNDLE field you enter the path of the folder with translations (full path to the folder or relative to the server).
Translation files
The default translation file is the xpdlMessages.i18n file. For individual translations, a file should be created with an appropriately appended language shortcut (a subpage with a list of supported languages can be found on the main page of the translation guide: Instruction - Translation)
Base name | PL | EN |
xpdlMessages.i18n | xpdlMessages_pl.i18n | xpdlMessages_en.i18n |
The sequence of downloading translations from files works on the following principles:
Let's assume that the following translation files are available:
- xpdlMessages_en.i18n
- xpdlMessages_pl.i18n
xpdlMessages.i18n
If the user's language is English (en),
then the system will first try to load the file: xpdlMessages_en.i18n, when
this attempt fails, then the system will try to load the file xpdlMessages.i18n.
Adding translations
Adding a new file with translations:
If you add a new language file, create a new file with the appropriate shortcut in the name as described in the "Translation files" section. Then copy the entire contents of the xpdlMessages file and paste it into a new file. For example, when you want to have language files in our system that support translations in English and German, the catalog containing these files should look like the following.
Adding new translations to an existing file:
Adding new translations to the elements of process maps will be discussed on the example of adding a translation to the description of the process in the vacation application - "Vacation application process"
First of all, in the language file xpdlMessages you search for the text to be translated - "The holiday application process".
PACK(holiday_application)_PROC(application_for_holiday)_DESC= The holiday application process
Translations in xpdl files are saved in the key = value format, to add a translation you need to change the value from the default language to the desired language.
PACK(holiday_application)_PROC(application_for_holiday)_DESC=The holiday application process
After saving the changes to the xpdl file, you must again select the server to receive more information from the system.
Additionaly, in situation of changing the translation of the process name and tasks so that the tasks and processes previously created in the system are also translated, you must add a scheduled task. Correspondingly, the tasks translation update (method - updateActivityLocale) and updating of process translations (method - updateProcessLocale) are used for this task. More information about scheduled tasks can be found in the project manual: Link - Scheduled tasks
Changing translations
If a translation has been changed, when you refresh the package or export the translations to a translation file, the old translation will be commented out (#) and the new translation will be added below it. For example:
#ACTIVITY(activity_3)=Activity 3 ACTIVITY(activity_3)=Activity 3 modified