Skip to content

Application Translations

To give you the opportunity to offer a translation for your own named parts of the software (e.g. Datastore Entries, IOS), the Application Translation System is available to you. To translate any texts in your programs or function blocks please take a look at the chapter function block translations. If you plan to provide an additional language for all text in drag&bot please take a look at how to add a language.

What elements can be translated?

  • Dashboards titles in the Operator Cockpit
  • IO panel elements
  • IO panel categories
  • Datastore elements
  • Quick Access Moves (QAMs)
  • Scenario Designer object titles

Defining translations

Application translations specified for your unique application and therefore stored in the robotsystem. For each language you want to provide translations for you need to create a separate file. These files need to be stored in /workspace/application/dragandbot/dnb/data/application_translations/, each file needs to have the two letter short code of the language 🌍 as its name and it needs be in JSON format. To create a file for english translations the file name for example would be en.json".

Adding to self defined language

When content is added to a self defined language, you need to reuse the same language ID shortcode e.g. es-MX

JSON translation format

The file contains the translation Ids and the corresponding translations. In the following example app.hello is the Id and the provided translation is Hello.

{
    "app.hello": "Hello"
}

Translation files can also be nested to have less repetitions.

{
    "app": {
        "hello": "Hello"
    }
}

Using translations

You can use those application translations in most text input fields. To use your application translations you need to select the translation mode by clicking on the arrow on the right of the input field and select "Translation". Now you can enter your translation Id in the input field, in the example above this would be app.hello. Below the input field you can see a preview of the translated text.

Example of a input field when using translations

Example of a input field when using translations

drag&bot translations

By using the prefix DNB. you can also access all translation keys that are available in drag&bot. You can find a overview of all drag&bot translation on github 🌍.

Example for using a drag&bot translation

Example for using a drag&bot translation