Platform & Access · Back-office interface language

The staff interface is shown in Spanish or Portuguese when the browser is set to one of them, and in English otherwise, with English filling any missing string.

AreaPlatform & Access
Routesapplication
Centre modulesalways available
Staff levelsall
Models—
UI label(intl)
Coverage2 use cases · 1 happy · 3 failure

Known issues (1)

How it works

_setLanguage() always loads English first, then — if navigator.language starts with es or pt — loads that locale, strips keys whose value is an empty string (_removeKeysWithVoidValues) and calls intl.setLocale([lang, 'en']), so untranslated strings fall back to English rather than rendering blank. Loading is retried up to three times before giving up with a console error. There is no in-app language switcher: the only control is the browser’s language setting. This is separate from the content languages configured per centre (see Multi-language content authoring).

Use cases

Why someone opens this (2)

  • Spanish and Portuguese centre staff using the back office in their own language.
  • Shipping a new string in English first while translations catch up, without blank labels.

Path map

flowchart LR
    F(["Back-office interface language"]):::feat
    F --> H1["Portuguese browser"]:::ok
    F -.-> X1["Unsupported browser language"]:::bad
    F -.-> X2["Translation bundle fails to load"]:::bad
    F -.-> X3["Wrong-language string in a bundle"]:::bad
    classDef feat fill:#4a5c8a,stroke:#4a5c8a,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Portuguese browser

  1. Browser language is pt-PT; English and Portuguese bundles load.
  2. Empty Portuguese values are removed and the locale chain is set to pt, then en.
  3. The UI renders in Portuguese with English for any gaps.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Portuguese browser
  • ⛔ Unsupported browser language
  • ⛔ Translation bundle fails to load
  • ⛔ Wrong-language string in a bundle

Implementation


Generated from doc/feature-inventory.json · id platform-ui-language · commit 276788ca6