To start, lets start with the basic workflow. Then we will visit the details.
In order to translate strings in TEAMS-RDS, the following steps need to be performed:
- Find Lanuage and optional Country code from IANA Language Subtag Registry for language being translated into
- Translate strings
- Covert translated string file to ASCII
- Deploy
Let’s start with step 1. Why do we need the language and optional country code? Inside of TEAMS-RDS is an ApplicationResources.properties file which contains the default strings. When a user selects Chinese as their language, TEAMS-RDS will look for strings in file named ApplicationResources_zh.properties. If the string isn’t found in the Chinese strings file, then the default strings file will be searched. Notice how the Chinese strings file name is suffixed with underscore and the IANA language code for Chinese i.e. zh. This is why the language code is needed. It is used to properly store your translations.
Now we can also use an optional Country code giving us the power to deal with dialect differences. For instance, Chinese has two country codes of importance, CN for Simplified Chinese and TW for traditional Chinese. So if you want Simplified Chinese translations you’d put them in a file named ApplicationResources_zh_CN.properties. Then when your user sets their language to Simplified Chinese, TEAMS-RDS will first look in ApplicationResources_zh_CN.properties for the string, if not found it will look in ApplicationResources_zh.properties and if not found will look in ApplicationResources.properties.
Once you have choosen the appropriate language and optional country code, its time to start translating. First copy the default strings file found in %RDS_HOME%\webapps\RDS\WEB-INF\classes\resources\ApplicationResources.properties to your desktop with name ApplicationResources_{language code}_{country code}.encoded.properties. For instance, when our language and country code are zh and CN respectively, our file name will be ApplicationResources_zh_CN.encoded.properties. From there we will translate our strings. QSI finds that Notepad++ is the best editor for dealing with non-english strings. In your case, you will want to encode the file using UTF-8. UTF-8 will support a good majority of languages. To have Notepad++ encode the file as UTF-8, open the file, go to Encoding -> Convert to UTF-8, then save the file.
Once you are done translating the file, we need to convert the non-english strings into ASCII based Unicode escape sequences. This step is necessary as Java will not successully display the translated strings without. Have no fear, for a utility is here. That utility is packaged with the Java SDK and it is called native2ascii. native2ascii will find any Unicode characters in a file, then convert the character to a unicode escape sequence i.e. \uXXXX. For instance, 技能 gets converted into \u6280\u80fd. So lets convert our translate file from earlier. First open Command Prompt, then run the following commands:
set JAVA_HOME={path to the jdk} set PATH=%PATH%:%JAVA_HOME%\bin cd %USERPROFILE%\Desktop native2ascii -encoding UTF-8 ApplicationResources_zh_CN.encoded.properties ApplicationResources_zh_CN.properties
Now that we have successully translated and converted our strings file, its time to deploy our changes. First stop TEAMS-RDS by clicking Start -> Programs -> TEAMS-RDS -> Stop TEAMS-RDS Services. Wait for all services to stop. Then open a File Explorer to %RDS_HOME%\webapps\RDS\WEB-INF\classes\resources. Copy your translated file here. Then start TEAMS-RDS by clicking Start -> Programs -> TEAMS-RDS -> Start TEAMS-RDS Services. Log in as any user. Go to My Information. Then update your Primary Language to that of the translated strings file. You should now see your translations displayed throughout the GUI:)
If you have any questions, feel free to contact Support.