Mashup Builder > Widgets > Widget Localization
Widget Localization
You can use localization tables to localize the user interface of your mashup applications. In ThingWorx, localization tokens are used to store localized strings within localization tables for each supported language. When customizing localizable properties on the Properties pane, you can select tokens instead of typing a static text value. When viewing a mashup at run time, the widget labels are displayed based on the user’s language preferences.
You can use localization tokens to perform the following tasks:
Translate localizable widget properties in a mashup.
Apply localization tokens to dates for locale-specific formatting. For information more, see Formatting Date and Time for Widgets.
Display custom tooltips for charts. For more information, see Creating Custom Chart Tooltips.
The following example shows a mashup interface that is translated into different languages:
Consider the following practices when localizing mashups:
Update localization tables with any required tokens while developing your user interface. Creating tokens during the initial development is more efficient than finding and replacing labels in your mashups later.
Use a prefix or suffix specific to your extension to avoid conflicts with system tokens or tokens from other extensions.
To localize the user interface of your application, perform the following steps:
1. In Composer, add new localization tokens to the Default localization table.
2. Provide the localized values for each one of these localization tokens.
* 
When a language value is not available, the token’s default localization definition is used. When you define a new localization token, you must define it in the default table and provide a default value.
3. Apply the localization tokens to widget properties in Mashup Builder.
4. Preview the changes at run time.
5. Optionally, add new localization tables for languages that are not supported in ThingWorx by default.
Applying Localization Tokens to Widgets
1. In Mashup Builder, select a widget on the canvas.
2. On the Properties panel, locate the localizable property you want to edit, then click the globe icon (). A list of available localization tokens is displayed.
3. Select the localization token from the list, then click Set.
You can filter the list using the filter box and preview translations using the Language drop-down list.
4. Click Save to apply changes to the mashup.
At run time, the value of the localization token is displayed based on the language of the user. For more information about localization tokens and tables, see Localization Tables.
Previewing Languages at Runtime
To preview different languages, use the localization list displayed on the toolbar at run time. The list enables you to preview the look and layout of your mashup in different languages. You can add support for additional languages that are not available in this list. For more information, see Adding a New Language which is not Supported by ThingWorx.
The following image shows the drop-down list used to preview languages at run time:
For more information on the available options when viewing a mashup, see Viewing a Mashup.
Adding Support for Additional Languages
You can translate a user interface into additional languages not supported by ThingWorx by adding localization tables to the platform using the Import and Export menu. For more information about adding support for new languages, see Adding a New Language which is not Supported by ThingWorx.
Was this helpful?