/
Internationalization (i18n)

Internationalization (i18n)

SINCE VERSION 9.0

What is Internationalization (i18n)?

Internationalization (often abbreviated as i18n, where "18" stands for the number of letters between the first 'i' and the last 'n' in "internationalization") refers to the process of designing and developing a software application so that it can be easily adapted to various languages and regions without requiring engineering changes to the source code. This approach allows the same software to be used globally, supporting multiple languages, character sets, and cultural conventions.

How does it work in PIPEFORCE?

Enable i18n per app

Because of performance reasons, customized i18n on app level is disabled by default.

In order to enable it, you have to set "i18n": true in your app config. For example:

{ "title": "My app", "i18n": true }

Language key (locale) detection

Whenever the UI is loaded in the portal, the application will in first step check for the currently selected language key (= locale) in this order (first finding wins):

  1. There is a request parameter locale (for example ?locale=en).

  2. The currently logged-in user has the attribute locale set in IAM (for example locale:en).

  3. The default language of the browser is used.

i18n URI (key)

After the locale was detected, it will be used to translate all i18n URIs in the UI having a format like this:

$uri:i18n:<app>/<context>/<key>
  • <app>
    Is optional and represents the name of the app which contains the i18n translation messages. If missing, the io.pipeforce.common app will be used as default.

  • <context>
    Represents a specific group of translation messages. This way, messages can be better organized. Is optional for common i18n keys and If missing, the name portal is used here. For app specific i18n keys, the context is mandatory and must be individually given.

  • <key>
    The key of the translation message.

Let’s assume for example an i18n URI like this:

$uri:i18n:com.acme.myapp/form/hello_world

This example defines these sections:

  • <app> = com.acme.myapp

  • <context> = form

  • <key> = hello_world

Here is another example with key only (no app and no context are given):

This example defines these sections:

  • <app> = io.pipeforce.common (default since none is given in uri)

  • <context> = portal (default since none is given in uri)

  • <key> = hello_world

And so