Skip to main content

Localization for DPU Components

Abstract

Localization for DPU Components

This section contains a short guide on how to enable localization for DPU components. The file resources.properties in this location src/main/resources/resources.properties takes care of the localization for any DPU component present.Labels in dialogues, options, messages, and exceptions will be extended with the text contained in it. This file contains text that is presented to the user as a message or as a part of a configuration dialogue. In our case the file contains two messages.

Note

It’s highly recommended to put all the strings inside this file and not directly into code as it makes DPU localization much easier.

In order to properly support localization, each string that should be localized shall go through the localization function presented under user context ctx.tr. There might be some exceptions in helpers, for example ContextUtils call this function on every given part of messages.Text in DPUs should be denoted as a name of properties in the resource.properties file. See existing DPUs for examples. It’s highly recommended to prefix each string with DPU name.