Skip to content

03 — Requirements — International Language

Version: 1.11
Last Updated: 2026-08-06 16:23:15
Status: Normative product specification. I18N-P0 extraction complete in app code; I18N-P1 engineering in progress (see design plan). Build order locked — see §2.1. Supersedes as canonical i18n spec: 02-REQUIREMENTS.md §7.35 detail — REQ-IDs remain authoritative in doc 02; this document is the breakout for strategy, UX, waves, and delivery.

Related: 02-REQUIREMENTS.md §1.8, §7.35, NFR-11/12 · 01-ARCHITECTURE.md § Internationalisation · 04-ROADMAP §Master Phase 3 · 04-ROADMAP §15 · 18-STRIPE-GLOBAL-PRICING.md · Palliative Care Archetypes §4.4 · 31 delivery register §2.41


LynCareOS serves family carers across countries and languages. International language support is a platform capability (not a billable module): it governs how the app frame is translated while user-entered care content stays in the language the family typed.

This document captures:

  • What exists today (English UI; multi-currency billing).
  • The full requirement set (REQ-I18N-01…38 and NFR-11/12).
  • The language switcher you described (current language visible; switch to another language e.g. Français → Русский for a Russian-speaking carer).
  • Industry and healthcare best practices applied to our stack (react-i18next, RTL, plain vs clinical language).
  • A phased delivery programme linked to the roadmap.

Design principle: Mature this over time — translation quality tiers, register rules, and locale expansion are expected to evolve for years.


DimensionProduction launch (today)Target programme
App UI languageEnglish onlyUser-selectable languages per §8
Billing currenciesUSD + AUD, NZD, GBP, EUR, CAD, INR (live)Same + locale config per country; not the same as UI language
Language switcher (app)NoneHeader control: current language + picker (§6)
Language switcher (marketing)EN + FR — Language control + lyncareos_marketing_locale; currency picker unchangedSame + additional marketingEnabled locales (§6b)
Per-user languageNoneusers.locale_override — e.g. French UI while tenant default is English (REQ-I18N-10)
Clinical voice (English)Documented (Register R2); audit pending (C7)Plain register only in every locale — no clinical view toggle (REQ-I18N-18 deferred 2026-08-03)
i18n libraryNone in reporeact-i18next + i18next (REQ-I18N-01)

International language programme

I18N-P0 EN framework

I18N-P1 FR + switcher

I18N-P2 plug-in Wave 1b

Wave 2 RTL + CJK

Wave 3 East Asia

Today — production

English UI

8 Stripe presentment currencies

Product decision (2026-06-04): implement the full i18n framework once, with en-AU as the canonical default, then fr-FR as the first non-English locale to validate the plug-in model. Remaining Wave 1b languages follow as l10n + config enable — not repeated engineering.

MilestoneRoadmap phaseEngineeringl10n / QA
A — English frameworkI18N-P0react-i18next, extract all UI strings, typed keys, fallback chain, logical CSS, locales.config.json (en-AU enabled), CI coverage for EN100% en-AU keys in repo before FR starts
B — French + switcherI18N-P1fr-FR bundle, LanguageSwitcher, tenants.locale, users.locale_override, API persistence, REQ-I18N-07…08 in appTier 1 + Tier 2 lay review for FR; E2E switch + reload
C — Wave 1b plug-insI18N-P2a → P2bPer locale: JSON files + enabled: true only (REQ-I18N-33)Translation + review per language; batches below

French-first (engineering): fr-FR ships in Milestone B before Spanish, German, or Russian — Latin script, LTR, EU terminology in 02 §1.8, and proof of inheritance (fr / fr-FR) before scaling l10n.

Deferred from Milestones A–B (explicit): marketing language (I18N-M1), backend notification templates (REQ-I18N-11), shopping-catalog UI strings (API ?locale= may stay partial), English regional variants (en-GB, en-US, …) — variants are override-only after en-AU is complete.

Shopping catalog product names are data, not UI chrome — they localise through catalog_item_aliases / catalog_category_translations, not react-i18next bundles. The jurisdiction-aware translation principle, brand-name policy, and admin/community refinement loop for this dataset are canonical in 06-SHOPPING-MODULE.md §5 — the same “consult the target market’s own conventions, never translate literally” principle applies to every future locale (frame strings included).

Wave 1b l10n batches (Milestone C — calendar, not code):

BatchLocalesNotes
I18N-P2aes-ES, de-DE (+ variants per §8)High-volume Latin; same plug-in process as FR
I18N-P2bnl-NL, it-IT, pt-PT, ru-RU (+ variants)Cyrillic QA for ru-RU; no RTL/CJK gates

Not plug-in like French: Wave 2+ (Arabic RTL, Japanese CJK) require layout/font/sign-off gates (REQ-I18N-13, §8).

Milestone A: EN framework

Milestone B: FR + switcher

Milestone C: plug-in locales


TermMeaning in LynCareOS
i18nEngineering: externalised strings, locale config, RTL-ready layout, APIs that accept locale — build once
l10nOperations: translated JSON files, professional review, market launch — add per language
TypeExamplesPlatform behaviour
FrameNav, buttons, prompts, dropdown labels, errors, notificationsTranslated per active locale
ContentCare notes, medication free text, shift narratives, user namesNever translated — stored and shown as typed (Unicode)

See REQ-I18N-16.

ConceptExampleUsed for
Localefr-FR, en-AU, ru-RUUI strings, date/number format, regional terms (GP vs family doctor)
LanguageFrench, RussianWhat the language switcher primarily represents
CurrencyEUR, AUD, INRStripe / tiers.json only — orthogonal to UI language

A subscriber may pay in EUR (France) while a carer switches the app to Russian for personal preference (REQ-I18N-10).

ConceptGovernsDoes not govern
Locale (tenants.locale, users.locale_override)UI strings, Intl formats, outbound user-facing comms localePHI storage region, database residency, encryption jurisdiction
Stripe / countryPresentment currency, allowed_countriesUI language
Restricted localesProduct availability (e.g. zh-CN excluded)Automatic data routing — see REQ-I18N-38

3.5 Plain language (clinical view toggle deferred)

Section titled “3.5 Plain language (clinical view toggle deferred)”

Default UI uses lay carer wording in every locale. Palliative Register R2 rules apply to English seed and family-visible strings until each locale is reviewed (Palliative §4.4).

Product decision (2026-08-03): There is no user-facing clinical view toggle — carers see plain language only. Optional _clinical translation keys and REQ-I18N-18…19 remain deferred; do not block P0/P1 on dual-key pairs or toggle UI. Tier 3 validated scale wording is unchanged (§7.8b).

From backend/billing/tiers.json and 18-STRIPE-GLOBAL-PRICING.md:

CurrencyTypical markets
USDBase
AUD, NZDAustralia, New Zealand
GBPUnited Kingdom
EUREurozone (incl. IE, FR, DE, ES, IT, NL, BE, …)
CADCanada
INRIndia

INR billing does not imply Hindi UI — Hindi is Wave 2 in the language programme.


4. Current state (implementation audit 2026-06-02)

Section titled “4. Current state (implementation audit 2026-06-02)”
AreaStateEvidence
Frontend i18nNot implementedNo react-i18next; no frontend/src/locales/
Backend tenants.locale / users.locale_overrideNot in schemaPlanned in architecture; not shipped
Backend backend/locales/Not presentREQ-I18N-11 future
Shopping catalog locale columnsPartialV012 — API accepts ?locale=; UI English
Date/number displayEnglish conventionsdate-fns / Intl without locale switching
Marketing siteEN + FR Tier 1 + signup chrome; Language + currency pickers; lyncareos_marketing_locale cookiemarketing/palliative/ + js/marketing-i18n.js
Marketing → tenant localelocale on start-signup → pending_signups.locale → tenants.locale + users.locale_override on provision; Stripe Checkout locale hintV032, stripe_provisioning.py
Stripe / tiersLive multi-currencyDoc 18
Language register (product voice)Doc complete (C0a)Palliative §4.4; C7 audit pending

5. Industry and healthcare best practices (applied)

Section titled “5. Industry and healthcare best practices (applied)”

Research synthesis (Smashing Magazine, NN/g, SimpleLocalize, healthcare l10n vendors, react-i18next ecosystem) informs LynCareOS requirements:

PracticeLynCareOS decision
Externalise all UI strings; no hardcoded copy in pages/componentsREQ-I18N-01, 02
Use react-i18next + lazy-loaded namespacesREQ-I18N-01, 02
Typed translation keys (compile-time safety)REQ-I18N-04
CSS logical properties before RTL localesREQ-I18N-12, NFR-12
dir on <html> + dir="auto" on user text fieldsREQ-I18N-13, 20
Intl for dates, numbers, currency displayREQ-I18N-07
Professional translation for UI; lay review for Tier 2 clinical plain language§7.8 tiers
Validated scale translations only (Tier 3)§7.8 — no ad-hoc NRS/Abbey translations
Pseudo-localisation in CI before launch of each wave§10 testing
Healthcare: clinician / lay carer review per marketTier 2 review + country operator model (future)
RTL: hybrid automated layout checks + native speaker QAWave 2 gate

5.1 Flags, language names, and picker order

Section titled “5.1 Flags, language names, and picker order”

Your intent: See the current language at a glance, open a control, and switch to another language (e.g. French UI → Русский for a Russian-speaking carer) — without implying that one country or flag “owns” a language.

UX research consensus:

  • Do not use flags as the only label — flags denote countries; languages cross borders (Spanish ≠ one flag; French ≠ France only; Arabic spans many states).
  • Do use native language names (descriptor) — Français, Русский, Español — so users recognise their language immediately.
  • Emoji flag + descriptor together — acceptable as a pair: regional-indicator emoji from config (flagEmoji) plus native name. The name carries meaning; the emoji is decorative recognition only.
  • Optional gloss — Русский with secondary Russian in the active UI language helps users scanning the list.
  • Alphabetical picker order — sort open lists by native language name (Unicode collation), not by flag, country, or commercial “priority markets”. Neutral ordering avoids implying one language is more important than another.

LynCareOS rules (REQ-I18N-21…25, 31):

ElementRule
Closed controlEmoji flag (if configured) + native name + chevron
Open pickerSame row pattern; every enabled locale; rows sorted A→Z by native name (REQ-I18N-31)
Accessibilityaria-label="Language: Français" — never flag-only
Currency pickerUnchanged — may keep currency codes / flags for pricing only; separate control

6. Language switcher in-app (REQ-I18N-21…25)

Section titled “6. Language switcher in-app (REQ-I18N-21…25)”
IDRequirementStatus
REQ-I18N-21A Language control is visible in the authenticated app chrome on mobile and desktop: primary location top app bar (near account / settings); duplicate entry under Settings → Language for discoverability.Future
REQ-I18N-22Closed state shows: (1) emoji flag for the active locale (locales.config.json → flagEmoji, e.g. 🇫🇷); (2) native language name / descriptor (e.g. Français, Русский); (3) chevron. Emoji is supplementary — never without the native name. On narrow mobile, emoji + truncated native name is acceptable if full name does not fit — full native name required on every open-picker row.Future
IDRequirementStatus
REQ-I18N-23Open state lists every enabled locale (not theoretical Wave 3 only). Each row: flagEmoji + native name (primary) + gloss in the active UI language (secondary) + checkmark on current row. Rows sorted per REQ-I18N-31 (alphabetical by native name — not by flag or country).Future
REQ-I18N-24Selecting a language immediately switches UI strings (i18next changeLanguage), updates document.documentElement.lang and dir, persists preference to users.locale_override via API, and does not log the user out. Other household members are unaffected.Future
REQ-I18N-25If the user’s override differs from tenant default, Settings shows a short explanation: “Your language is Russian. The family account default is French.” with optional Reset to family default action.Future
RuleExample
Group or label variants when multiple locales share a languageEnglish (Australia), English (UK) under one English group, or flat list with region suffix
User selects a locale id (ru-RU, fr-FR) — not a countrySwitching to Russian loads ru / ru-RU bundle
Disabled / coming-soon localesNot shown until Wave ships and enabled: true in config
IDRequirementStatus
REQ-I18N-31Alphabetical by language descriptor: app and marketing language pickers sort enabled locales by nativeDisplayName using Intl.Collator (sensitivity: 'base'; locale und or the active UI locale). Forbidden: ordering by flag emoji, ISO country code, billing market priority, subscriber counts, or manual “featured” pins. Variant locales sort by full native label (e.g. English (Australia) before English (United Kingdom)). The closed control shows only the current language — not a priority subset of the list.Future

Picker — open

emblem FR · Français · Russe · check

emblem RU · Русский · Russe

emblem GB · English UK · Anglais

Toolbar — closed

emblem FR

Français

chevron

RuleImplementation
KeyboardFocus trap in modal / listbox; Escape closes
Screen readeraria-haspopup, aria-expanded, aria-current on active language
Announce changearia-live="polite" brief announcement: “Language changed to Russian”
Touch targetsMin 44×44 px per row (mobile-first)
LayerResponsibility
components/i18n/LanguageSwitcher.tsxPresentation only — reads enabled locales from config
lib/i18n.tsi18next init, detectors, changeLanguage wrapper
PATCH /api/users/me or settings endpointPersist locale_override
AuthContext / bootstrapApply saved locale on login

6b. Language switcher on marketing site (REQ-I18N-26…30)

Section titled “6b. Language switcher on marketing site (REQ-I18N-26…30)”

Public marketing (lyncareos.com, starting with marketing/palliative/) must offer the same manual language choice as the app. Auto-detection is a convenience default only — it must never be the only way to get the user’s language (VPN, travel, diaspora, shared devices, and wrong IP/country hints are common).

ControlPurposeMust not
Language (REQ-I18N-26…29)UI copy language (fr-FR, ru-RU, …)Change Stripe presentment currency
Pricing region / currency (existing)USD, AUD, EUR, … for tier pricesChange page language

Both controls sit in the marketing header on desktop and mobile. Labels must disambiguate: e.g. Language vs Pricing currency (not two unlabelled flag buttons).

IDRequirementStatus
REQ-I18N-26When two or more marketing locales are enabled in locales.config.json, a Language control is always visible in the marketing site header (all public pages that ship translations). It uses the same UX rules as the app switcher (§6): emblem (optional) + native language name + chevron; open picker lists every enabled marketing locale with native name, gloss in the active page language, and checkmark on the current row.Future
REQ-I18N-27Supported languages only: the picker shows exactly the set of locales enabled for marketing (subset of app waves is allowed — e.g. Wave 1 only — but every enabled locale appears; no “detected” language is omitted from the list). Disabled / not-yet-translated locales are not shown.Future
REQ-I18N-28Auto-detect is a hint, not a lock: on first visit with no saved preference, default page language is chosen by: (1) saved lyncareos_marketing_locale if present; else (2) navigator.languages / Accept-Language mapped to nearest enabled locale; else (3) optional country hint (e.g. Cloudflare CF-IPCountry or existing IP pricing lookup) mapped to a default locale for that country when defined in config; else (4) en-AU. Regardless of detection outcome, the Language control stays visible so the user can override (VPN, expat, bilingual household, incorrect geo).Future
REQ-I18N-29Manual override persists: when the user selects a language, the page switches immediately (reload or in-place string swap), document.documentElement.lang and dir update, and the choice is stored in lyncareos_marketing_locale (localStorage + cookie with reasonable max-age). Return visits use the saved value before any auto-detect. Signup / register links may pass ?locale= or set tenant default hint — product rule in implementation plan.Future
REQ-I18N-30Currency control unchanged: the existing region/currency picker (marketing/palliative/index.html) continues to drive Stripe presentment currency only. Changing language does not change currency; changing currency does not change language.Future (currency live; language Future)

6b.3 VPN and wrong-region scenarios (explicit)

Section titled “6b.3 VPN and wrong-region scenarios (explicit)”
ScenarioExpected behaviour
User in France on VPN exit in USMay see USD pricing from IP; page language may default to en-US from browser or country hint — user opens Language → selects Français → copy and persistence update; currency unchanged unless they also change pricing region
Russian speaker in UK householdDefault en-GB possible; user selects Русский from picker without leaving the site
User clears site dataAuto-detect runs again; picker still lists all enabled languages
ItemLocation
Translation filesmarketing/palliative/locales/{locale}/ (or shared frontend/src/locales/ marketing namespace imported at build) — Tier 1 only for hero, features, FAQ, legal snippets
Shared configSame locales.config.json enabled flags; optional marketingEnabled: true per locale
Delivery phaseI18N-M1 — after at least one non-English marketing bundle exists; may ship with I18N-P2 Wave 1 — §10

Marketing header — desktop

Language: Français v

Pricing: EUR v

Login

Picker: all enabled locales

Picker: USD AUD EUR ...


7. Requirement catalogue (REQ-I18N-01…38)

Section titled “7. Requirement catalogue (REQ-I18N-01…38)”

Statuses mirror 02-REQUIREMENTS.md — all Future until programme starts.

IDRequirementStatus
REQ-I18N-01Externalise all user-facing frontend strings; library react-i18next + i18next, with the i18next-icu plugin from the first key so plural/select syntax is standard ICU MessageFormat. i18next’s native message format is non-standard and creates friction with translation platforms; standardising now avoids rewriting every plural in every locale when a TMS is adopted (REQ-I18N-36). Toolchain: official i18next-cli (instrument, extract, types, lint, status).Future
REQ-I18N-02Canonical path: frontend/src/locales/{locale}/ (not frontend/public/locales/). Core namespaces: common.json, clinical.json, errors.json, notifications.json. Large domains may add modules/{module-slug}.json (e.g. medication.json). Lazy-load per namespace; Vite bundles at build time.Future
REQ-I18N-02aDual keys: key (plain) and key_clinical (clinical view). DB stores codes, not labels. Both keys required in en-AU before any other locale is enabled.Deferred — no clinical toggle; plain keys only for P0/P1
REQ-I18N-03Runtime fallback chain (no UI collapse): active locale → extends parent locale → base language (e.g. fr before fr-FR) → en-AU → visible sentinel [MISSING: key] (safe text, not redacted). Clinical view: requested key_clinical → plain key → same geographic chain → en-AU. Tier 3 scales: validated translation only; else English per §7.8. Dev: log warnings; prod: log silently, render fallback.Future
REQ-I18N-04TypeScript key generation for t() — compile-time errors on typos.Future
IDRequirementStatus
REQ-I18N-05frontend/src/locales/locales.config.json: locale code, language, country, nativeDisplayName (picker sort key + primary label), flagEmoji (Unicode regional-indicator pair for supplementary display — not identity), date/time formats, week start, separators, emergency number, terminology map (§1.8), direction (ltr/rtl), enabled, marketingEnabled (optional), extends.Future
REQ-I18N-06Locale inheritance (en-CA extends en).Future
REQ-I18N-07Display formatting via Intl.* driven by config; API returns UTC ISO + raw numbers.Future
REQ-I18N-08Regional terms from config terminology, not hardcoded (GP, PBS, etc.).Future
IDRequirementStatus
REQ-I18N-09tenants.locale — default for household; set at signup / admin Settings.Future
REQ-I18N-10users.locale_override — personal UI language; powers language switcher; does not change other users.Future
REQ-I18N-11Backend strings (push, email, API errors to users) use effective locale; logs stay English. backend/locales/{locale}/.Future
IDRequirementStatus
REQ-I18N-12Tailwind logical properties (ms-*, ps-*, start-*) for new/refactored UI.Future
REQ-I18N-13dir="rtl" on <html> when config says so; full RTL QA before Arabic ships.Future
StepActivity
1Add locales.config.json entry + emblem asset
2Translation files (or variant overrides)
3Stripe / tiers.json if new currency
4Update §1.8 terminology column in doc 02
5Checkout allowed_countries + marketing
6QA: formats, terminology, RTL if applicable
7–8Marketing copy; country operator (optional)
IDRequirementStatus
REQ-I18N-14operator tenant type for distribution partners.Future
REQ-I18N-15Operator provisioning and operator_tenant_id tagging.Future
IDRequirementStatus
REQ-I18N-16Frame vs content separation.Future
REQ-I18N-17Plain language default in every locale.Future
REQ-I18N-18Clinical view toggle (user setting).Deferred — product 2026-08-03: not shipping
REQ-I18N-19Clinical (i) reference popover / bottom sheet.Deferred — tied to REQ-I18N-18
REQ-I18N-20dir="auto" on user text inputs.Future
TierContentTranslatorReview
1 — UI chromeNav, buttons, settings, errorsMulti-model AI consensus + automated back-translation diff (professional translator optional)Native-speaker spot review — every high-risk string plus ≥10% sample per namespace; standard l10n QA
2 — Plain clinicalPrompts, observation labels (plain keys)Multi-model AI consensusMandatory native lay carer review; reviewer ≠ translator; “Would a family member say this?”
3 — Validated scales (verbatim exception only)Official Abbey/PAINAD/Rockwood/NRS/MMSE item text if product explicitly ships themOfficial published translations only — never AI, never volunteerLicence + permission; English fallback if missing

Default for new clinical observation UI (product 2026-08-03): Do not ship verbatim validated instruments. Use published scales as design references and implement LynCareOS-owned carer-observation models (original domain labels and bands, Tier 2 review). That avoids third-party copyright and licence fees for the base product and future modules unless product opts into the verbatim Tier 3 exception above.

Launch coverage (enabled locale): ≥95% of keys per namespace for Tier 1; 100% for Tier 2 plain keys in that locale; _clinical pairs not required while REQ-I18N-18 is deferred; Tier 3 may use English until validated copy exists. CI enforces via REQ-I18N-34. Failed CI blocks enabled: true — runtime still falls back per REQ-I18N-03.

7.8a Production model (amended 2026-08-03)

Section titled “7.8a Production model (amended 2026-08-03)”

Tier 1 and Tier 2 are produced by multi-model AI consensus with human native review, not by a contracted professional translator. Design rationale and evidence: docs/plans/2026-08-03-i18n-p0-p1-design.md §3.8. Summary: LLMs reach 85–95% of professional quality and UI strings are their strongest case; multi-model consensus cuts visible errors and stylistic drift by 18–22% versus a single engine; human post-editing adds ~8%, concentrated in exactly the naturalness and register judgements a machine cannot self-assess. A native-speaker family carer is the correct Tier 2 reviewer — better than a certified medical translator, who tends to correct toward clinical register.

Three controls are mandatory for any locale using this model:

ControlRequirement
Glossary + do-not-translate listfrontend/src/locales/glossary.json, authored during I18N-P0 alongside the English keys. AI and volunteer translation both drift on terminology without one.
Back-translation diff in CIEvery locale bundle is machine back-translated and diffed against en-AU; semantic divergence is flagged for human decision. Humans do not read 3,000 strings by hand.
High-risk string setStrings concerning dose, timing, allergy, or emergency contact always receive review by a second person; the reviewer is never the translator.

PHI boundary (absolute). Translation tooling — including any AI model, TMS, or machine-translation API — receives en-AU UI keys only. No user content, no PHI, and no database extract ever leaves the platform for translation purposes. Health data is GDPR special-category data, and MT error rates on medical content run 2–8%. See REQ-I18N-16 and REQ-I18N-36.

Tier 3 (verbatim exception only). If product ever ships official validated instrument wording, clinical validity and copyright still apply — neither AI consensus nor native review substitutes for permission. Default: ship LynCareOS-original observation copy instead (§7.8b).

Sustainability. This model is a permanent obligation, not a one-off effort: every release adds strings to every enabled locale. Community-translation experience is consistent — volunteers translate a large batch and then lapse. Keep the enabled locale count small until a market justifies the maintenance load, and let the REQ-I18N-34 coverage gate block a locale rather than shipping it partially translated.

7.8b Tier 3 validated instruments register

Section titled “7.8b Tier 3 validated instruments register”

Tier 3 applies when LynCareOS displays the official wording of a copyrighted or licence-governed clinical instrument. Product default: avoid that path — build LynCareOS-original observation instruments inspired by clinical literature (see strategy paragraph under §7.8 tier table).

Instrument / familyWhere it appears todayPolicyNotes
Numeric pain 0–10 (generic)Live — PainScaleBar, painColors.tsTier 2 — LynCareOS lay labelsNot branded NRS/VAS
Custom observation scalesLive — ObservationCard scale_1_5 / scale_1_10Tier 2Product-defined anchors
Observational distress (Abbey / PAINAD-inspired)Future — REQ-NVPAIN-01LynCareOS-owned model — original item wording (Tier 2); do not paste Abbey/PAINAD listsLiterature reference only
Frailty / function snapshot (CFS-inspired)Future — REQ-FRAILTY-01LynCareOS-owned descriptors — do not ship Rockwood nine official labels or CFS pictorial without licenceOptional “inspired by” note in spec, not UI
Verbatim validated instrumentsOnly if product explicitly opts inTier 3 — official translation + licenceException path; not base product

Marketing / catalog (“PAINAD-style”, “Frailty Tracking”) describes capability — not permission to reproduce instrument text.

Canonical engineering illustration: docs/plans/2026-08-03-i18n-p0-p1-design.md §Appendix A. Agent rule: i18n-frontend.mdc.

7.9 Operations, runtime, and plug-in model

Section titled “7.9 Operations, runtime, and plug-in model”
IDRequirementStatus
REQ-I18N-33Plug-in locale model: after I18N-P0/P1, adding a Wave 1 Latin/Cyrillic locale requires only: (1) complete namespace JSON under frontend/src/locales/{locale}/; (2) locales.config.json entry with enabled: true; (3) CI coverage pass (REQ-I18N-34). No application code changes for Tier 1–2 frame strings. Regional variants use extends overrides only.Future
REQ-I18N-34Translation coverage gate: CI emits locale_coverage.json (keys % per locale per namespace). Block merge if below thresholds in §7.8. en-AU must be 100% before I18N-P1 starts.Future
REQ-I18N-35Lazy-load resilience: if a locale/namespace chunk fails to load within 3s, fall back to en-AU for that namespace, log warning (prod: telemetry), do not break shell layout.Future
REQ-I18N-36TMS (optional at scale): from I18N-P2a onward, professional translations may be managed in a TMS (Lokalise, Crowdin, Transifex, or equivalent). I18N-P0/P1 may use git-tracked JSON + CI only. TMS is not required to ship FR.Future
REQ-I18N-37Marketing bundle sync: when marketingEnabled: true and app bundle exists for a locale, marketing Tier 1 JSON is generated or copied in CI into marketing/palliative/locales/{locale}/ (or shared marketing namespace at build). No manual-only locale drops. Ships with I18N-M1.Future
REQ-I18N-38Locale restrictions register: maintain a table (this doc §8.1 or linked compliance doc) of locales excluded or conditional (e.g. zh-CN) with reason (sovereignty, licensing, health-data rules). Exclusion is product/compliance — not inferred from tenants.locale.Future

See table above. First proof locale: fr-FR (I18N-P1).

See §7.8 and §11. Pseudo-localisation (150% UI / 200% labels max expansion) runs before enabling each new locale in CI.

REQ-I18N-38 — Locale restrictions register

Section titled “REQ-I18N-38 — Locale restrictions register”
LocaleStatusReasonReview trigger
zh-CNExcludedMainland health-data sovereignty, app licensingLegal + product sign-off
(add rows when assessing new markets)

Naming: “Wave 1” here is the first i18n programme release, not “languages at marketing gate”. Production launch remains English UI + multi-currency billing.

Engineering build order (§2.1): Wave 1a (en-AU) → fr-FR first (I18N-P1) → remaining Wave 1b as plug-ins (I18N-P2a/P2b). Market-priority table below is l10n scheduling, not code order.

WaveLocales (representative)LanguageScriptRTLMarketsProgramme notes
Wave 1aen-AU (+ en-GB, en-US, en-NZ, en-CA, en-IE variants)EnglishLatinNoAU, UK, US, NZ, CA, IEI18N-P0 — extract all strings; variants = overrides only
Wave 1b (first)fr-FR (+ fr-CA, fr-BE variants)FrenchLatinNoFR, CA, BEI18N-P1 — first non-English; variants extend fr-FR
Wave 1bes-ES, es-MX, es-419SpanishLatinNoES, MX, LATAMI18N-P2a plug-in
Wave 1bde-DE, de-AT, de-CHGermanLatinNoDACHI18N-P2a plug-in
Wave 1bnl-NL, nl-BEDutchLatinNoNL, BEI18N-P2b plug-in
Wave 1bit-ITItalianLatinNoIT, CHI18N-P2b plug-in
Wave 1bpt-PT, pt-BRPortugueseLatinNoPT, BRI18N-P2b plug-in
Wave 1bru-RURussianCyrillicNoRU, CIS, diasporaI18N-P2b plug-in; diaspora example (FR UI → switch to ru-RU)
Wave 2ar (+ regional variants)ArabicArabicYesMENA, diasporaRTL sign-off mandatory
Wave 2hi-INHindiDevanagariNoIndia, diasporaPairs with INR billing
Wave 2ja-JPJapaneseCJKNoJapanUI density / fonts
Wave 3ko-KRKoreanHangulNoKorea
Wave 3zh-TW, zh-HKTraditional ChineseCJKNoTW, HK, diasporaNot zh-CN until legal review

Simplified Chinese (zh-CN): Excluded until mainland sovereignty, licensing, and health-data rules are assessed.


Aligned with 01-ARCHITECTURE.md:

Backend — deferred P1+

Frontend — frontend/src/locales

l10n ops — optional TMS from P2a

TMS or git JSON

LanguageSwitcher

react-i18next

locales.config.json

en-AU + fr-FR + plug-ins

users.locale_override

tenants.locale

backend/locales/

Default locale: en-AU for platform, tenant default, and ultimate runtime fallback (REQ-I18N-03).

Effective locale resolution order:

  1. users.locale_override (language switcher / Settings)
  2. Else tenants.locale
  3. Else browser navigator.languages / Accept-Language (first visit only)
  4. Else country hint (Cloudflare CF-IPCountry or the existing IP pricing lookup), only where config defines a default locale for that country
  5. Fallback en-AU

Country is not language. Steps 3 and 4 are deliberately in this order and must not be swapped. IP geolocation is a weak hint: VPNs, travel, expatriates, and diaspora households break it, and carers are disproportionately in exactly those situations. A British family caring for a relative in France must not receive a medication UI in French. Where the country hint disagrees with the language resolved at step 3, show a dismissible suggestion (“also available in Français”) — never switch silently. Matching uses @formatjs/intl-localematcher (CLDR UTS #35), not string comparison, so fr-CA → fr-FR and en-IE → en-AU resolve correctly (REQ-I18N-06). This chain is identical for the app and for marketing (REQ-I18N-28).


Mapped to 04-ROADMAP §15.

PhaseScopeExit criteria
I18N-P0 — Foundation (Milestone A)REQ-I18N-01…05 (en-AU only), 12, 34; extract all UI strings; lib/i18n.ts; logical CSS on shell; REQ-I18N-03/35 runtime behaviorApp runs via t() with no hardcoded strings in pages//components/; en-AU 100% CI coverage; pseudo-localisation gate optional
I18N-P1 — French + switcher (Milestone B)REQ-I18N-21…25, 09…10, 07…08; fr-FR Tier 1+2 bundles; migration tenants.locale default en-AU, users.locale_override; LanguageSwitcherUser switches en-AU ↔ fr-FR; preference survives reload; Tier 2 FR lay review complete
I18N-P2a — Plug-ins (batch 1)REQ-I18N-33; es-*, de-* l10n + enableLocales in picker; CI coverage pass each
I18N-P2b — Plug-ins (batch 2)REQ-I18N-33; nl-*, it-IT, pt-*, ru-RU l10n + enableSame; Cyrillic smoke for ru-RU
I18N-P0v — English variantsen-GB, en-US, … as extends overrides onlyOptional; not blocking FR
I18N-M1 — Marketing languageREQ-I18N-26…30, 32, 32a, 37; Tier 1 marketing copy; hreflang≥2 marketingEnabled locales; CI sync; VPN-safe picker; SEO alternates verified
I18N-P3 — Clinical polishREQ-I18N-17; C7 per enabled locale; REQ-I18N-18…19 deferredRegister R2 alignment for shipped locales
I18N-P4 — Wave 2+RTL (Arabic); Hindi, Japanese; Wave 3RTL hybrid QA; CJK font/density gates
I18N-BE — Backend l10nREQ-I18N-11 push/email/API errorsMay trail P1; not blocking app switcher

I18N-M1 trails I18N-P1 unless product needs French marketing in the same release — app framework + FR is the priority (§2.1).

I18N-P2a/P2b are l10n-calendar batches — engineering work is complete after P1; remaining effort is translation and QA per locale.

Dependency: C7 (English Register R2 audit) should complete before or in parallel with I18N-P0 so extracted English keys reflect correct family voice.

Not blocking public launch: Entire programme is post-gate unless product promotes a specific language for a market launch.


TestWhenGate
locale_coverage.json (CI)Every PR touching locales; block enabled: true if below §7.8 thresholdsREQ-I18N-34
Pseudo-localisationBefore enabling each new localeMax 150% string length (UI chrome); 200% (labels/buttons)
Language switcher E2EI18N-P1Select FR → UI French; reload → still French; second user keeps tenant default
Missing-key smokeP0+Force missing key → [MISSING: …] or en-AU; no blank/error boundary
Lazy-load failureP1+Simulate slow/failed chunk → en-AU within 3s (REQ-I18N-35)
RTL visual checklistWave 2 — nav, modals, forms, tooltipsNative QA + mirror automation
CJK font/line-heightWave 2 ja-JPSystem stack (Noto Sans CJK, platform fonts)
Tier 3 scalesEach localeEnglish fallback when no validated translation
dir="auto" scopeP0+User inputs only — not frame labels or platform-generated strings
22-PRODUCTION-MANUAL-QA.mdPer locale at enableSmoke appendix row

Surfacei18n programme
app.lyncareos.comFull programme — switcher (REQ-I18N-21…25) + namespaces
lyncareos.com marketingLanguage switcher required when ≥2 locales enabled (REQ-I18N-26…31) — lists all supported languages; auto-detect + always-visible manual override (VPN-safe). Currency picker stays separate (live today). Phase I18N-M1 (REQ-I18N-32).
Stripe CheckoutStripe-localised checkout UI; LynCareOS controls allowed countries and price IDs

REQ-I18N-32 — Marketing localisation programme

Section titled “REQ-I18N-32 — Marketing localisation programme”
IDRequirementStatus
REQ-I18N-32Marketing (lyncareos.com) uses the same locales.config.json and picker rules as the app (flagEmoji + nativeDisplayName, alphabetical sort per REQ-I18N-31, REQ-I18N-26…30). Implementation: client-side JSON bundles on Cloudflare Pages (no v1 Workers requirement). Tier 1 marketing strings only (hero, features, FAQ, CTA, footer). Ships in I18N-M1 when ≥2 marketingEnabled locales have bundles. Bundle delivery synced per REQ-I18N-37. English-only marketing does not block public launch (A6).Future
REQ-I18N-32aMarketing SEO — hreflang: For each public marketing page, emit correct link rel="alternate" hreflang="…" tags for every marketingEnabled locale, plus hreflang="x-default" pointing at en-AU. Locale-specific URLs use stable path prefixes (e.g. /fr/…, /en-AU/…) consistent with the language picker and lyncareos_marketing_locale cookie handoff to the app. Verify alternates in the marketing deploy checklist (20-PRODUCTION-DEPLOYMENT-GUIDE / deploy-marketing-pages.ps1).Future

IDRequirementStatus
NFR-11Frame translated; content not; plain default; new locale = files + config + Stripe without code changes; marketing hreflang when ≥2 marketing locales (REQ-I18N-32a)Future
NFR-12Logical CSS properties; RTL-ready from first i18n mergeFuture

When adding REQ-I18N-*:

  1. Add row to this document and 02-REQUIREMENTS.md §7.35.
  2. Add row to 31-REQUIREMENTS-CODE-MARKETING-RECONCILIATION.md §2.41.
  3. Update 04-ROADMAP §15.
  4. Update architecture diagram in 01-ARCHITECTURE.md if stack changes.

DateVersionChange
2026-08-061.11I18N-M1 shipped (EN↔FR): marketing Language control + bundles; lyncareos_marketing_locale; signup locale → pending_signups → tenant/user provision (V032); Stripe Checkout locale hint; /fr + /en-AU prefixes + hreflang. FR legal pages ship as product copy — counsel review still required before jurisdiction-binding use.
2026-08-031.8§7.8 / §7.8b — default LynCareOS-owned observation instruments (Abbey/PAINAD/Rockwood as references only); Tier 3 reserved for explicit verbatim instrument exception. Cursor: i18n-frontend.mdc. Tooling: ESLint i18n ratchets + check_i18n_eslint_ratchet.py.
2026-08-031.7Product: no clinical view toggle — REQ-I18N-18/19 and REQ-I18N-02a deferred; §3.5 and §7.8 launch coverage updated. Marketing: REQ-I18N-32a — hreflang + locale URL prefixes in scope for I18N-M1. §7.8b Tier 3 instrument register (live vs future vs licence). Ops: PostgreSQL REINDEX after VPS OS upgrade — runbook §18, doc 11 §2q, doc 20 §7.
2026-08-031.6§7.8 amended — Tier 1/2 produced by multi-model AI consensus + native lay-carer review (replaces professional-translator mandate); §7.8a adds the three mandatory controls (glossary, back-translation CI diff, high-risk string set), the absolute PHI/translation boundary, Tier 3 licensing gate, and sustainability guidance. REQ-I18N-01 adds i18next-icu and the i18next-cli toolchain. §9 effective locale resolution gains the country-hint step with an explicit country ≠ language rule and intl-localematcher matching. P0/P1 engineering design linked.
2026-06-041.5Build order locked: EN framework (P0) → FR + switcher (P1) → Wave 1b plug-ins (P2a/P2b). REQ-I18N-33…38 (plug-in model, CI coverage, lazy-load, TMS optional, marketing CI sync, locale restrictions). REQ-I18N-03/02 expanded; canonical path frontend/src/locales/; §2.1 milestones; §3.4 locale ≠ residency.
2026-06-021.4Removed §14 open decisions (resolved items are requirements only); REQ-I18N-32 marketing programme; no priority-locale proof list.
2026-06-021.3REQ-I18N-31 alphabetical picker; flagEmoji + native descriptor.
2026-06-021.2REQ-I18N-26…30 — marketing Language switcher (all enabled locales, VPN-safe manual override); I18N-M1 phase.
2026-06-021.1Renumbered from doc 33 to 03 — aligns under master requirements (doc 02).
2026-06-021.0Initial breakout — consolidates §7.35; adds language switcher REQ-I18N-21…25; clarifies currency vs UI language; delivery phases I18N-P0…P4; UX research on flags + native names.