Adding a New Language which is not Supported by ThingWorx
By default, the platform system language is set to English. Additional languages are available such as German, Italian, and Japanese. Each language has a localization table that contains translated token values from English. To add a new language that is not officially supported, you must create a new localization table entity that includes translated tokens from the Default and System tables.
1—Export the Default and the System Localization Tables
1. In Composer, click Browse, then under System, select Localization Tables.
2. From the list of localization tables, select the System localization table.
3. In the More drop-down, select Export for Source Control.
4. Save the XML file to a folder on your system.
5. Repeat steps 2 through 4 for the Default localization table.
Both tables contain tokens in English that you must translate.
2—Combine the Default and the System Localization Tables Tokens
To include all tokens that are used by the ThingWorx platform, you must combine tokens that are stored within the Default and the System localization tables
1. In your system, open the exported Default and System tables using an XML editor.
2. Combine the localization tokens of each table into one table:
a. In the Default table, copy all Row elements under Rows.
b. In the System table, add the elements that you copied in the previous step after the last Row element. Add a comment if needed. Use the following XML structure for reference:
<Rows>
<!--System Tokens -->
<Row>...<Row/>
<Row>...<Row/>
...
<Row>...<Row/>
<! End of System Tokens -->
<!--Default Tokens -->
<Row>...<Row/>
<Row>...<Row/>
...
<Row>...<Row/>
<! End of Default Tokens -->
<Rows/>
| Make sure that the final XML is valid and system tokens must be added before the default tokens. New tokens must have unique names. When two tokens share the same name, the value of the last token is used. |
c. In the System table, edit the following attributes of the LocalizationTable tag:
▪ languageCommon—The name of the language as it appears in the common language of the system.
▪ languageNative—The name of the language as it appears in its native script.
▪ name—The language name inlanguage-Script-REGION-variant format, based on the IETF BCP 47 language standard. Only the language subtag is required. Other parts are optional.
| Languages with right-to-left scripts are not supported. |
The following is an example for Dutch:
<LocalizationTable
aspect.isCreatable="false"
aspect.isSystemObject="true"
description="System localization table"
documentationContent=""
homeMashup=""
languageCommon="Dutch"
languageNative="Nederlands"
name="nl"
projectName=""
tags="">
3. Translate the values of the localization tokens within the XML file from English into the target language.
Each Row element in the XML contains the following tags:
◦ name—Stores the token name.
◦ value—Stores the actual value to translate.
For example, the Edit label is the text that you can translate in the following token:
<Row>
<context></context>
<name>
<![CDATA[
Widgets.TreeGrid.EditButton
]]>
</name>
<usage></usage>
<value>
<![CDATA[
Edit
]]>
</value>
</Row>
4. Save the updated XML file to a new location on your system.
3—Import the Translated Localization Table
1. Open the translated XML file and make sure that the name, languageCommon, and languageNative values are correct.
2. In Composer, click Import/Export, then select Import.
3. In the Import window, click Browse, then selected the translated XML file.
4. Click Import.
The new localization table entity is now listed under Localization Tables. You can select the new language when localizing your applications and when changing the language settings for a user.