Table of Contents

Localize

Block Group: String Operations
Icon:no icon

Localize block

The Localize block returns translated text for the current language. It reads a language file from the project and returns the translation for each custom parameter that you add to the block.

The language file is locales/<language>.json in the project, for example locales/en.json or locales/fr.json. The file contains a JSON object that maps keys to translated text. The object can be nested, for example:

{
  "title": "Building Overview",
  "alarm": {
    "high": "High Alarm",
    "low": "Low Alarm"
  }
}

For information on using dataflow blocks, see Dataflow.


Input/Output Properties

The following property of the Localize block can take input and give output.

language specifies the language code, which is the name of the language file without the .json extension. If language is null, en is used.


Output Properties

Each custom parameter returns the translation for the key that matches the parameter's name.


Remarks