Skip to content

Runtime languages

eaxScadaReferenceStarterProEnterpriseView as Markdown

Migrated page, not yet verified against the current code. Treat values, paths and examples as indicative until this notice is removed.

To translate a project step by step, see Translate your project.

What Languages
The runtime’s own texts (menus, dialogs, keypad, alarm objects, phone mode, toasts) English, French, German, Italian, Spanish (en, fr, de, it, es)
Your project’s texts Any language code you add, for example nl or pt-BR
The Studio’s own texts English, French, German, Italian, Spanish, chosen apart from the runtime’s language (see The Studio’s language); some parts still in English

A language code is a lower-case language (fr), optionally followed by a region or script (fr-CH, zh-Hant). FR and pt_BR are accepted and stored as fr and pt-BR.

The project’s languages and its default language are the languages and defaultLanguage members of the project styles (/api/dev/styles).

Right-to-left languages (Arabic, Hebrew) are planned for a later release.

A text property (text, label, title, a button’s upText, downText and activeText, a confirmation question, an e-signature meaning, an alarm’s name and description) holds one of:

Value Shown
Start pump as written, in every language
t:pump.start the key’s text
t:pump.start|Start pump the key’s text; Start pump when no language has one

A key is 1 to 200 characters: letters, digits, _, . and -, starting with a letter, a digit or _.

  1. The key’s text in the operator’s language.
  2. The key’s text in the project’s default language.
  3. For the runtime’s own texts: the English text.
  4. The fallback after |.
  5. The key itself. In the studio a missing key is shown as ⟦pump.start⟧, so you see it.

{name} is replaced by an argument. A placeholder without an argument stays as written, so a missing value shows instead of an empty space. A number argument is written in the language’s format. '{ and '} write a brace.

Plurals:

{count, plural, =0 {no alarm} one {# alarm} other {# alarms}}
  • =0, =1… match an exact number.
  • one and other follow the language’s rules. In French, one covers 0 and 1.
  • # is the number, written in the language’s format.

The runtime writes numbers and dates as in the operator’s language: 1234.5 is 1,234.5 in English, 1 234,5 in French and 1.234,5 in German. Values in the alarm objects and on the faceplate keep no thousands separator. Times use the 24-hour clock.

The on-screen keypad’s decimal separator, and its default keyboard layout (AZERTY for French, QWERTZ for German), follow the operator’s language.

The runtime starts in:

  1. the language chosen in this browser, then
  2. the signed-in user’s saved language (it wins when it differs: another panel may have changed it), else
  3. the project’s default language.

The language is chosen in the session menu (Language) or, on a phone, in the Account sheet. The change applies at once, without reloading the page: the page fires the event eax:lang-changed, and every text is set again.

The user’s language is saved on the server:

Route Who
GET /api/auth/me/preferences any signed-in user, for themselves {"language": "fr", "studio_lang": "de"}; "" when none is saved
PUT /api/auth/me/preferences any signed-in user, for themselves body {"language": "fr"}, {"studio_lang": "de"} or both. Only the fields given change; the others keep their saved value, and {} changes nothing. "" clears a field (the runtime then uses the project’s default language, the Studio English). A language that is not a language code, or a studio_lang that is not en, de, fr, es or it, is refused (400) and nothing is saved. A change is recorded in the authentication audit trail (PREFERENCES_CHANGED).

Before this release a PUT replaced the whole record: {} cleared the saved language. A client of your own that sends {} or leaves language out to clear it must now send {"language": ""}.

The Studio, where engineers build the project, has a language of its own: English, French, German, Italian or Spanish. It is separate from the operator runtime’s language, and neither changes the other: an engineer can work in a German Studio while the runtime shows the screens in French.

  • Choose it with the language button in the top bar (it shows the current code, for example EN), or with View > Studio language…. The menus, panels and tables switch at once, without a reload; Reload the Studio in the same menu draws everything again.
  • Where it is kept: in this browser and, when you are signed in, in your user preferences on the server (studio_lang, see the table above). When the Studio opens, your saved choice on the server wins over the browser’s. Until you choose one, the Studio is in English.
  • Your project’s texts keep the preview language. The texts of your screens shown in the editor are in the preview language, which starts at the project’s default language, whatever the Studio’s language. The Studio language never translates project data.
  • What is translated so far: the menus, the top bar, the workspace rail, the status bar, the Displays editor’s toolbars and panels, Tags, Alarms, the common dialogs (confirmations, signatures, new display, rename, unsaved changes), and the workspaces that were already translated, such as Analytics and Reports, the connection forms, the deploy preview and System Health. Since 18 November also: the Drivers workspace (its tabs, the station words, the forms and the Add connection dialog; a language change re-draws them and keeps what you typed), the PLC hardware wizard, the 3D kit, its palette and the materials, the isometric blocks (palette, outliner, inspector, the placing texts, and the keyboard shortcuts in Help), the 2D Assets tab and its dialogs, the inspector’s States section and the step names of the undo history. A palette or asset search finds an item by its name in the Studio language and by its English name. Other parts of the Studio still show English and follow in later releases.
  • Dashboard cards follow the operator’s language. In the operator runtime the cards’ own texts (labels, states, buttons, the “Command not sent” messages) are in the runtime language the operator chose, and switch when it changes; in the Studio’s dashboard editor they are in the Studio language. Only the words change: what a card’s command writes, when it is disabled and its mode codes are the same in every language.
  • Dashboard commands in the operator’s language. The interlock reasons, the confirmation and e-signature dialogs of a command card and the success messages are in the operator’s runtime language. The signed meaning and the audit reason stay in English, exactly as the server records them: the e-signature dialog shows the meaning verbatim under the translated Meaning label. Manage dashboards
  • Counts in each language’s plural. Every grid’s row count and warning chip, in the Studio and the operator runtime, uses the language’s singular and plural forms (“1 alarm”, “2 alarms”; “1 Zeile”; French counts 0 and 1 as singular: “0 alarme”), in the five languages. Before, some read “1 alarms” or “1 rows”.

The routes work on the active project; ?project=<id> names another one.

Route Who
GET /api/i18n/keys any signed-in role The table: keys (each with key, note, texts by language, status by language: missing, machine or reviewed), languages, defaultLanguage, counts by language and status, _rev (also the ETag).
GET /api/i18n/keys/<key> any signed-in role One key.
PUT /api/i18n/keys engineer Body {"set": [{"key", "texts"?, "status"?, "note"?}]}. A text given sets that language ("" removes it); a text changed without a status is reviewed; status sets machine or reviewed.
DELETE /api/i18n/keys engineer Body {"keys": [...]}, or ?key= repeated.
GET /api/i18n/languages any signed-in role languages, defaultLanguage and the project styles’ revision.
PUT /api/i18n/languages engineer Body {"languages", "defaultLanguage"}. Changes only these two members of the project styles. The texts of a removed language are kept.
GET /api/i18n/bundle/<lang> any signed-in role The runtime bundle (below).
GET /api/i18n/export.csv any signed-in role The table as CSV; ?missing=<lang> exports the keys not yet reviewed in that language.
POST /api/i18n/import engineer A CSV file (body), merged into the table. Answers a report: rows, keys_added, texts_set, texts_unchanged, languages_added, skipped.
POST /api/i18n/extract/preview engineer Body {"scope": "screen" | "folder" | "project", "screen", "folder", "open_screen"?}. The literal texts that can become keys, with a suggested key, the screen’s revision, and a safety note for confirmation and e-signature texts. Changes nothing.
POST /api/i18n/extract/apply engineer Body {"doc_rev", "reason", "confirm_safety", "screens": [{"id", "rev", "items": [{"pointer", "text", "key"}]}], "open_screen", "open_items"}. See Make translatable.
POST /api/i18n/draft engineer Body {"lang", "keys"?}. Drafts up to 200 missing texts with the project’s AI provider, marked machine. Answers drafted and skipped. 409 assistant_unavailable or provider_not_allowed when no provider may be used.

Every change:

  • names the revision it was made from in If-Match (the _rev). A table changed since is refused with 409 stale, and nothing changes;
  • is refused with 403 for a role below Lead_Engineer;
  • is recorded in the audit trail, category I18N (UPDATE, DELETE, LANGUAGES, IMPORT, EXTRACT, DRAFT), with the keys before and after;
  • on a high-availability pair, is made on the primary with quorum only (409 on a standby, 503 without quorum), and committed to the cluster before it is saved (domain i18n, document project/<id>).

A document is refused (400 invalid, with the problems) for a key that is not valid, a language code that is not one, a text over 4,000 characters, or more than 100,000 keys.

GET /api/i18n/bundle/fr answers the project’s texts in one language:

{ "project": "default", "lang": "fr", "defaultLanguage": "en",
"languages": ["en", "fr", "de"], "texts": { "pump.start": "Démarrer la pompe" } }

The ETag is a hash of the content. The browser keeps the bundle and asks again on each use (Cache-Control: private, no-cache); an unchanged bundle answers 304. The runtime loads the operator’s language and the default language.

The runtime’s own texts are static files: /static/i18n/<lang>.json.

  • Only texts the preview lists, with the text the preview showed, are changed: any other pointer, or a text changed since, refuses that screen.
  • A confirmation or e-signature text needs confirm_safety: true; without it nothing is saved (409 safety_confirmation_required).
  • The keys are added first, in one change of the table (doc_rev). A key already holding another text in the default language is refused.
  • Each screen is then saved once, from the revision of the preview (rev). A screen changed since is refused (conflicts, status stale); the others are saved. The answer is 200, or 409 with status partial or conflict.
  • Each text becomes t:<key>|<the text>.
  • The open screen’s items only add their keys; the answer’s open_values are the new values, which the studio sets in the editor as one undoable change.
key,note,en,fr,de
pump.start,Start button of the feed pump,Start pump,Démarrer la pompe,Pumpe starten
  • The first column is key; note is optional; every other column is a language code.
  • Export writes a UTF-8 byte order mark. A cell starting with =, +, -, @, a tab or a carriage return is written with a leading ', so a spreadsheet does not run it; import removes it again.
  • Import reads , or ; as the separator.
  • On import a non-empty cell sets the text, marked reviewed; an empty cell leaves the text as it is; unknown keys are added; a row with a key that is not valid is skipped and reported.
  • At most 16 MB.

An alarm definition’s name and description may be keys. Each live alarm and each journal row then carries:

Field
name, description The text in the project’s default language (the fallback, else the key).
message_key, description_key The keys.
message_args The placeholders’ values: tag, setpoint, alarm (the alarm id). The viewer adds value, the event’s value.

The alarm objects show the text in the viewer’s language. GET /api/alarms/history.csv writes it in the requester’s language: ?lang=, else the user’s saved language, else the default language.

Journals written before this release have no keys: their rows show their text as written. The alarm store adds the columns message_key, message_args and description_key itself on the first start.

When an operator signs a command or confirms one in another language than English, the audit trail records what they read:

What Recorded
A signature meaning given as a key <text as shown> [i18n <key> <language>], for example Démarrer la pompe [i18n pump.start fr]
A key that has no text (its fallback was shown) <fallback> [i18n <key> <language> untranslated]
A literal meaning as written
A confirmation answered in another language the reason, followed by [dialog "<question as shown>" i18n <key> <language>]

The rule translation-missing (information) reports every key a screen or component uses that has no text in one of the project’s languages, on the object and the property that use it.

Keys per project 100,000
Languages per project 50
Text 4,000 characters
Note 500 characters
Draft with AI 200 texts per run
Make translatable 20,000 texts and 500 screens per run