WorkSpace localization
Overview
WorkSpace has built-in localization and customization mechanism. To localize WorkSpace to a different language, localization file with translations is required. The application uses this file to display the appropriate language based on browser language settings detected automatically. If no browser language is defined, English translation is used. To localize WorkSpace to a new language, file for translation should be translated into the required language, and then the file needs to be included in the WorkFusion infrastructure.
Alternatively, you can use this mechanism to change the wording of particular menus and messages and avoid Workers' confusion.
Default File
The i18n.properties file contains all interface wording that can be changed.
See and download the default file below:
i18n.properties
Translation
To translate or modify items' names, you need to edit the corresponding properties, see the example in English and Russian:
i18_ru.properties
tab.tasks=Задачи
Non-ASCII symbols are encoded and the Russian file looks like the one below:
tab.tasks=\u0417\u0430\u0434\u0430\u0447\u0438
i18n.properties
tab.tasks=Tasks
Customization
Let's say, the following UI message confuses internal workers:
Your results were submitted and will be approved or rejected shortly. You can use the following code as a unique reference for the task you have just submitted.
In this case, you need to find the corresponding section in the i18n.properties file and change its wording according to your goals:
messages.info.yourResultsHaveBeenSubmittedAndWillBeApprovedOrRejectedShortly.acceptNewTask=Your results have been submitted.
Apply changes
Translate
i18n.propertiesfile to required language or introduce the required changes to items.(translation only) Add language code to file name, for example, rename to
i18n_sv.propertiesfor the Swedish language.(translation only) Encode to unicode if required. This can be done using ASCII utility:
native2ascii -encoding utf-8 i18n_sv.properties i18n_sv.propertiesPut or add the modified i18n*.properties files in WEB-INF/classes folder without rebuilding the JAR: Alternatively, you could add or update the translation file to Workspace WAR with the following commands:
rm -rf ./workspace unzip -qq workspace.war -d ./workspace jar -uf workspace/WEB-INF/lib/workspace-core.jar i18n_sv.properties jar -uvf workspace.war workspace/WEB-INF/lib/workspace-core.jar