The DPS application is designed to be accessed by people of different languages. To do this you can translate labels and messages and into as many languages as you wish.
All the labels displayed by the DPS application are available with a default value, but additionally, it is possible to:
-
Define domain-specific labels and messages (e.g. Thing → Oven).
-
Define translation in various languages.
The DPS is automatically localized according to the browser language and the best matching configured language, but optionally, users can redefine the preferred language when navigating the application.
Configuring labels
By entering the Appearance / Labels page, you can configure the labels and translations for the various languages.
By clicking the Add Language tab, you can add a new language available to users. Within each language tab, you can translate labels. If the specific language translation is missing, the English one is used.
By clicking the Add Label button, you can register a new label to be used in the UI.
How labels are displayed
Labels are displayed by the UI components, that automatically detect the user language, and search the translation for a given text.
For instance, suppose to access the DPS application using your preferred language, which is Italian, and widget must display the label Thing.
- The UI searches for the IT translation of Thing.
- If the Thing label is not defined in Italian, the UI searches the English translation.
- If the Thing label is not defined in English, the UI print out the requested text as-is, in this case Thing.
How to deal with long labels
In some cases the labels are more than a few words, but they are long texts, e.g., descriptions or captions. For translation of long texts, it is recommended to define a generic key (e.g. status.description), use it within the user interface, and translate it into all languages, including English (default).
EN: status.description="The state the machine is currently in."
IT: status.description="Lo stato in cui si trova attualmente la macchina".
Comments
0 comments
Please sign in to leave a comment.