Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleInfo

Starting with SWAT 20.06 release

 

The translation functionality offers the possibility to translate the application in different languages. The main idea is based on namespaces, which offers the possibility of having different translations for multiple customers.

The namespace(s) are JSON files which store the translations for different parts of the application (Form fields, Grid column labels, Ribbons, Toolbars etc). For a particular namespace, there can be multiple languages defined (en, de, fr etc). All translations are identified by keys which are actually object properties in the JSON files.

 

The language can be set by adding ?setLng= in the URL. For example, one can add ?setLng=de which will load the German translations, or ?setLng=en for English translations.

The namespace(s) can be set through a PASOE setting: 

Code Block
languagexml
<TranslationNamespaces>akioma.common</TranslationNamespaces>

 

We also provide support for fallback language and fallback namespaces.

...

The fallback namespaces (fallbackNS) allows specifying multiple namespaces, that build upon each other. This is useful for customer specific namespaces, which will only contain translations different than the standard. Furthermore, if a key is not found in the first namespace then it will be checked in the next namespace defined. The setting is done in the PASOE config, like this:

Code Block
languagexml
<TranslationNamespaces>akioma.customer,akioma.common</TranslationNamespaces>

 

Example:

If the PASOE setting would be ‘akioma.customer,akioma.common’ and the language is set to ?setLng=en, the order is the following:

...