Localization Tables
Localization allows you to display run time labels in different languages or terminology. In ThingWorx, you can configure localization tables with tokens that are assigned to text in the Mashup Builder. Localization tokens can also be applied to dates and numbers for locale-specific formatting.
A default localization table is provided in ThingWorx. If a language-specific translation is not provided, the default localization definition for the token is used. When you define a new localization token, you must define it in the default table and provide a default value. They can then be used in the mashup environment. You can create new tokens in the mashup environment while you are designing and implementing your mashups. In the mashup environment, only widgets that have text display options can be configured for localization.
If you are working with extensions, see Packaging Extensions with Localization Tables.
Providing Additional Context for Translators
Optional fields for localization tokens provide translators with additional information about the text. A translator may be faced with an ambiguity if looking at the text outside of the application's context.
For example, the following is provided for French translation:
Since the word “book” has more than one translation in French (for example, to book a flight is réserver, to book a sale is enrégistrer, and book as a noun could be livre or cahier), the Usage and Context fields can assist the translators by providing more context. The information provided in these fields is duplicated when a localization table is duplicated, and appears in the editor and XML export files. While these fields are guides for translators, they do not affect run time behavior.
Creating and Configuring a Localization Table
1. From ThingWorx Composer, browse System > Localization Tables, and then click the New button.
2. Enter a locale, native language name, common language name, description, and then add the required tags.
For information on the required locale format, refer to the topic Migrating and Importing Localization Tables.
3. Click Save.
4. In the Localization Tokens area, click a localization token to edit.
5. In the Token Value field, enter a token value for the selected token.
6. In the Usage drop-down list, select Label or Message.
If the Label option is selected, the translation should be concise and abbreviated, whereas if the Message option is selected, the translation may be in sentences or paragraphs.
7. In the Context field, enter information that can help the translator understand where the token appears, what it conveys, if restrictions apply, or other useful information.
8. Click Save.
Adding Localization Tokens
1. From Composer, browse Visualization > Mashups , and then click a mashup to open the Mashup Builder.
2. To configure localization for a widget, click the globe () icon next to the localizable property.
All localizable fields are denoted by the globe icon to the left of the field.
3. Click the magic picker () icon to search for localization tokens, and then click Save.
a. To add a new localization token, browse System > Localization Tables.
b. Select the localization table, go to the Localizaton Tokens area and click Add.
To add a new localization token, browse System > Localization Tables, and then in the Localization Tokens area, click Add.
Assigning Localization Settings to a User
1. From Composer, browse Security > Users, and then select the user account.
2. In the General Information area, from the Languages field, click the edit () icon to select the user's locale preferences.
a. Drag and drop languages from the Available locales list to the Preferred locales (in order) list.
You can reorder the languages in the Preferred locales (in order) list using the drag and drop feature.
b. Click Done.
3. On the user profile screen, click Save.
Was this helpful?