Skip to main content

i18n

Two layers carry text in Liberty Next:

LayerContentLanguages
The interfaceButtons, Settings, Nomaflow pages, messages.English and French, shipped with the framework.
The configurationLabels of data items, list values, menu items, dialog tabs, prompts.One default label plus one translation per language, set in Settings.

The interface language​

Each user picks EN or FR in the bar at the top of the window. The choice is kept in the browser and applies at once: menus, column headers and list labels are reloaded in the new language.

Every request the application sends carries that language (X-Liberty-Lang header). A request without it — a direct API call — uses the first language of its Accept-Language header, without the region (fr-CA → fr), then the configuration's default language.


Translating the configuration​

Translatable elements have a default label and a Translations list — one line per language code (fr, de, es…), stored as l:

ElementWhere it is translated
Dictionary entry — the label of a data item, hence of every column that uses itLiberty Next → Build → Dictionary → Entries, Translations tab.
Enum valueLiberty Next → Build → Dictionary → Enums, on each value.
Menu item and folderLiberty Next → Build → Menus, Translations group of the inspector.
Dialog tabScreen editor, Dialog tab, on the tab.
Action prompt titleThe action's prompt_l.
[entries.CUSTOMER_STATUS]
label = "Customer status"
l = { fr = "Statut client", de = "Kundenstatus" }

When no translation matches the request's language, the default label is used. Language codes are written in lower case.

Column headers come from the dictionary: a column without its own label takes the translated label of its entry. A label typed directly on a screen column is not translated — leave it empty to inherit from the dictionary. See Dictionary.


Good practices​

  • Translate in the dictionary rather than on each screen: one entry feeds every column of every screen.
  • Write the default labels in the language most users read, and add the others as translations.
  • Translate the menu folders too: they are the first thing a user reads.

What's next​