Creating Localization Tables
Localization enables you to display runtime labels in different languages or terminology. In ThingWorx, you can configure localization tables with localization tokens. These localization tokens are assigned to text in Mashup Builder. You can use localization tokens to do the following tasks:
Apply localization tokens to dates for locale-specific formatting.
Translate the labels in your extension.
Best Practices for Creating Localization Tables
Use the following best practices while creating Localization Tables:
If your extension would be localized, create localization tables while developing your user interface. When you need to present localized label and message (non-data text) to your users, use a localization token and create new tokens as needed. It is much easier to do this during initial development than finding and replacing labels in your mashups later.
If your extension has a configuration option with a Data Shape that includes friendly names in its aspects, you must provide localization tokens to localize those prompts in ThingWorx Composer. If the name includes a period (.), it is converted to an underscore. For example, if aspects.friendlyName = "myNamespace.myKey", the localization token lookup is myNamespace_myKey.
To avoid conflicts with system tokens or tokens from other extensions, use a prefix or suffix that is specific to your extension. For example, instead of NoNameProvided, use MyExtension.NoNameProvided.
Export localization tables using the token prefix filter set to the correct namespace, and include the exported localization tables in the extension package.
Was this helpful?