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
1. Purpose
Section titled “1. Purpose”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.
2. Executive summary
Section titled “2. Executive summary”| Dimension | Production launch (today) | Target programme |
|---|---|---|
| App UI language | English only | User-selectable languages per §8 |
| Billing currencies | USD + AUD, NZD, GBP, EUR, CAD, INR (live) | Same + locale config per country; not the same as UI language |
| Language switcher (app) | None | Header control: current language + picker (§6) |
| Language switcher (marketing) | EN + FR — Language control + lyncareos_marketing_locale; currency picker unchanged | Same + additional marketingEnabled locales (§6b) |
| Per-user language | None | users.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 library | None in repo | react-i18next + i18next (REQ-I18N-01) |
2.1 Implementation strategy (build order)
Section titled “2.1 Implementation strategy (build order)”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.
| Milestone | Roadmap phase | Engineering | l10n / QA |
|---|---|---|---|
| A — English framework | I18N-P0 | react-i18next, extract all UI strings, typed keys, fallback chain, logical CSS, locales.config.json (en-AU enabled), CI coverage for EN | 100% en-AU keys in repo before FR starts |
| B — French + switcher | I18N-P1 | fr-FR bundle, LanguageSwitcher, tenants.locale, users.locale_override, API persistence, REQ-I18N-07…08 in app | Tier 1 + Tier 2 lay review for FR; E2E switch + reload |
| C — Wave 1b plug-ins | I18N-P2a → P2b | Per 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):
| Batch | Locales | Notes |
|---|---|---|
| I18N-P2a | es-ES, de-DE (+ variants per §8) | High-volume Latin; same plug-in process as FR |
| I18N-P2b | nl-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).
3. Concepts (read once)
Section titled “3. Concepts (read once)”3.1 Internationalisation vs localisation
Section titled “3.1 Internationalisation vs localisation”| Term | Meaning in LynCareOS |
|---|---|
| i18n | Engineering: externalised strings, locale config, RTL-ready layout, APIs that accept locale — build once |
| l10n | Operations: translated JSON files, professional review, market launch — add per language |
3.2 Frame vs content (non-negotiable)
Section titled “3.2 Frame vs content (non-negotiable)”| Type | Examples | Platform behaviour |
|---|---|---|
| Frame | Nav, buttons, prompts, dropdown labels, errors, notifications | Translated per active locale |
| Content | Care notes, medication free text, shift narratives, user names | Never translated — stored and shown as typed (Unicode) |
See REQ-I18N-16.
3.3 Locale vs language vs currency
Section titled “3.3 Locale vs language vs currency”| Concept | Example | Used for |
|---|---|---|
| Locale | fr-FR, en-AU, ru-RU | UI strings, date/number format, regional terms (GP vs family doctor) |
| Language | French, Russian | What the language switcher primarily represents |
| Currency | EUR, AUD, INR | Stripe / 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).
3.4 Locale ≠ region ≠ data residency
Section titled “3.4 Locale ≠ region ≠ data residency”| Concept | Governs | Does not govern |
|---|---|---|
Locale (tenants.locale, users.locale_override) | UI strings, Intl formats, outbound user-facing comms locale | PHI storage region, database residency, encryption jurisdiction |
| Stripe / country | Presentment currency, allowed_countries | UI language |
| Restricted locales | Product 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).
3.6 Currency at launch (not UI languages)
Section titled “3.6 Currency at launch (not UI languages)”From backend/billing/tiers.json and 18-STRIPE-GLOBAL-PRICING.md:
| Currency | Typical markets |
|---|---|
| USD | Base |
| AUD, NZD | Australia, New Zealand |
| GBP | United Kingdom |
| EUR | Eurozone (incl. IE, FR, DE, ES, IT, NL, BE, …) |
| CAD | Canada |
| INR | India |
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)”| Area | State | Evidence |
|---|---|---|
| Frontend i18n | Not implemented | No react-i18next; no frontend/src/locales/ |
Backend tenants.locale / users.locale_override | Not in schema | Planned in architecture; not shipped |
Backend backend/locales/ | Not present | REQ-I18N-11 future |
Shopping catalog locale columns | Partial | V012 — API accepts ?locale=; UI English |
| Date/number display | English conventions | date-fns / Intl without locale switching |
| Marketing site | EN + FR Tier 1 + signup chrome; Language + currency pickers; lyncareos_marketing_locale cookie | marketing/palliative/ + js/marketing-i18n.js |
| Marketing → tenant locale | locale on start-signup → pending_signups.locale → tenants.locale + users.locale_override on provision; Stripe Checkout locale hint | V032, stripe_provisioning.py |
| Stripe / tiers | Live multi-currency | Doc 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:
| Practice | LynCareOS decision |
|---|---|
| Externalise all UI strings; no hardcoded copy in pages/components | REQ-I18N-01, 02 |
Use react-i18next + lazy-loaded namespaces | REQ-I18N-01, 02 |
| Typed translation keys (compile-time safety) | REQ-I18N-04 |
| CSS logical properties before RTL locales | REQ-I18N-12, NFR-12 |
dir on <html> + dir="auto" on user text fields | REQ-I18N-13, 20 |
Intl for dates, numbers, currency display | REQ-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 market | Tier 2 review + country operator model (future) |
| RTL: hybrid automated layout checks + native speaker QA | Wave 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 secondaryRussianin 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):
| Element | Rule |
|---|---|
| Closed control | Emoji flag (if configured) + native name + chevron |
| Open picker | Same row pattern; every enabled locale; rows sorted A→Z by native name (REQ-I18N-31) |
| Accessibility | aria-label="Language: Français" — never flag-only |
| Currency picker | Unchanged — 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)”6.1 Placement and visibility
Section titled “6.1 Placement and visibility”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-21 | A 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-22 | Closed 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 |
6.2 Picker behaviour
Section titled “6.2 Picker behaviour”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-23 | Open 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-24 | Selecting 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-25 | If 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 |
6.3 Locale variants in the picker
Section titled “6.3 Locale variants in the picker”| Rule | Example |
|---|---|
| Group or label variants when multiple locales share a language | English (Australia), English (UK) under one English group, or flat list with region suffix |
User selects a locale id (ru-RU, fr-FR) — not a country | Switching to Russian loads ru / ru-RU bundle |
| Disabled / coming-soon locales | Not shown until Wave ships and enabled: true in config |
REQ-I18N-31 — Picker sort order
Section titled “REQ-I18N-31 — Picker sort order”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-31 | Alphabetical 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 |
6.4 Wireframe (logical)
Section titled “6.4 Wireframe (logical)”6.5 Accessibility
Section titled “6.5 Accessibility”| Rule | Implementation |
|---|---|
| Keyboard | Focus trap in modal / listbox; Escape closes |
| Screen reader | aria-haspopup, aria-expanded, aria-current on active language |
| Announce change | aria-live="polite" brief announcement: “Language changed to Russian” |
| Touch targets | Min 44×44 px per row (mobile-first) |
6.6 Component ownership
Section titled “6.6 Component ownership”| Layer | Responsibility |
|---|---|
components/i18n/LanguageSwitcher.tsx | Presentation only — reads enabled locales from config |
lib/i18n.ts | i18next init, detectors, changeLanguage wrapper |
PATCH /api/users/me or settings endpoint | Persist locale_override |
AuthContext / bootstrap | Apply 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).
6b.1 Separation from currency / region
Section titled “6b.1 Separation from currency / region”| Control | Purpose | Must 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 prices | Change 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).
6b.2 Requirements
Section titled “6b.2 Requirements”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-26 | When 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-27 | Supported 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-28 | Auto-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-29 | Manual 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-30 | Currency 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)”| Scenario | Expected behaviour |
|---|---|
| User in France on VPN exit in US | May 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 household | Default en-GB possible; user selects Русский from picker without leaving the site |
| User clears site data | Auto-detect runs again; picker still lists all enabled languages |
6b.4 Marketing content and phases
Section titled “6b.4 Marketing content and phases”| Item | Location |
|---|---|
| Translation files | marketing/palliative/locales/{locale}/ (or shared frontend/src/locales/ marketing namespace imported at build) — Tier 1 only for hero, features, FAQ, legal snippets |
| Shared config | Same locales.config.json enabled flags; optional marketingEnabled: true per locale |
| Delivery phase | I18N-M1 — after at least one non-English marketing bundle exists; may ship with I18N-P2 Wave 1 — §10 |
6b.5 Wireframe (marketing header)
Section titled “6b.5 Wireframe (marketing header)”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.
7.1 Core framework
Section titled “7.1 Core framework”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-01 | Externalise 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-02 | Canonical 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-02a | Dual 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-03 | Runtime 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-04 | TypeScript key generation for t() — compile-time errors on typos. | Future |
7.2 Locale configuration
Section titled “7.2 Locale configuration”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-05 | frontend/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-06 | Locale inheritance (en-CA extends en). | Future |
| REQ-I18N-07 | Display formatting via Intl.* driven by config; API returns UTC ISO + raw numbers. | Future |
| REQ-I18N-08 | Regional terms from config terminology, not hardcoded (GP, PBS, etc.). | Future |
7.3 Tenant and user locale settings
Section titled “7.3 Tenant and user locale settings”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-09 | tenants.locale — default for household; set at signup / admin Settings. | Future |
| REQ-I18N-10 | users.locale_override — personal UI language; powers language switcher; does not change other users. | Future |
| REQ-I18N-11 | Backend strings (push, email, API errors to users) use effective locale; logs stay English. backend/locales/{locale}/. | Future |
7.4 RTL layout readiness
Section titled “7.4 RTL layout readiness”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-12 | Tailwind logical properties (ms-*, ps-*, start-*) for new/refactored UI. | Future |
| REQ-I18N-13 | dir="rtl" on <html> when config says so; full RTL QA before Arabic ships. | Future |
7.5 New country checklist
Section titled “7.5 New country checklist”| Step | Activity |
|---|---|
| 1 | Add locales.config.json entry + emblem asset |
| 2 | Translation files (or variant overrides) |
| 3 | Stripe / tiers.json if new currency |
| 4 | Update §1.8 terminology column in doc 02 |
| 5 | Checkout allowed_countries + marketing |
| 6 | QA: formats, terminology, RTL if applicable |
| 7–8 | Marketing copy; country operator (optional) |
7.6 Country operator model
Section titled “7.6 Country operator model”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-14 | operator tenant type for distribution partners. | Future |
| REQ-I18N-15 | Operator provisioning and operator_tenant_id tagging. | Future |
7.7 Plain language and clinical view
Section titled “7.7 Plain language and clinical view”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-16 | Frame vs content separation. | Future |
| REQ-I18N-17 | Plain language default in every locale. | Future |
| REQ-I18N-18 | Clinical view toggle (user setting). | Deferred — product 2026-08-03: not shipping |
| REQ-I18N-19 | Clinical (i) reference popover / bottom sheet. | Deferred — tied to REQ-I18N-18 |
| REQ-I18N-20 | dir="auto" on user text inputs. | Future |
7.8 Translation quality tiers
Section titled “7.8 Translation quality tiers”| Tier | Content | Translator | Review |
|---|---|---|---|
| 1 — UI chrome | Nav, buttons, settings, errors | Multi-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 clinical | Prompts, observation labels (plain keys) | Multi-model AI consensus | Mandatory 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 them | Official published translations only — never AI, never volunteer | Licence + 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:
| Control | Requirement |
|---|---|
| Glossary + do-not-translate list | frontend/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 CI | Every 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 set | Strings 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 / family | Where it appears today | Policy | Notes |
|---|---|---|---|
| Numeric pain 0–10 (generic) | Live — PainScaleBar, painColors.ts | Tier 2 — LynCareOS lay labels | Not branded NRS/VAS |
| Custom observation scales | Live — ObservationCard scale_1_5 / scale_1_10 | Tier 2 | Product-defined anchors |
| Observational distress (Abbey / PAINAD-inspired) | Future — REQ-NVPAIN-01 | LynCareOS-owned model — original item wording (Tier 2); do not paste Abbey/PAINAD lists | Literature reference only |
| Frailty / function snapshot (CFS-inspired) | Future — REQ-FRAILTY-01 | LynCareOS-owned descriptors — do not ship Rockwood nine official labels or CFS pictorial without licence | Optional “inspired by” note in spec, not UI |
| Verbatim validated instruments | Only if product explicitly opts in | Tier 3 — official translation + licence | Exception 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”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-33 | Plug-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-34 | Translation 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-35 | Lazy-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-36 | TMS (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-37 | Marketing 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-38 | Locale 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 |
REQ-I18N-33 — Plug-in locale model
Section titled “REQ-I18N-33 — Plug-in locale model”See table above. First proof locale: fr-FR (I18N-P1).
REQ-I18N-34 — Translation coverage gate
Section titled “REQ-I18N-34 — Translation coverage gate”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”| Locale | Status | Reason | Review trigger |
|---|---|---|---|
zh-CN | Excluded | Mainland health-data sovereignty, app licensing | Legal + product sign-off |
| (add rows when assessing new markets) |
8. Language rollout waves
Section titled “8. Language rollout waves”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-FRfirst (I18N-P1) → remaining Wave 1b as plug-ins (I18N-P2a/P2b). Market-priority table below is l10n scheduling, not code order.
| Wave | Locales (representative) | Language | Script | RTL | Markets | Programme notes |
|---|---|---|---|---|---|---|
| Wave 1a | en-AU (+ en-GB, en-US, en-NZ, en-CA, en-IE variants) | English | Latin | No | AU, UK, US, NZ, CA, IE | I18N-P0 — extract all strings; variants = overrides only |
| Wave 1b (first) | fr-FR (+ fr-CA, fr-BE variants) | French | Latin | No | FR, CA, BE | I18N-P1 — first non-English; variants extend fr-FR |
| Wave 1b | es-ES, es-MX, es-419 | Spanish | Latin | No | ES, MX, LATAM | I18N-P2a plug-in |
| Wave 1b | de-DE, de-AT, de-CH | German | Latin | No | DACH | I18N-P2a plug-in |
| Wave 1b | nl-NL, nl-BE | Dutch | Latin | No | NL, BE | I18N-P2b plug-in |
| Wave 1b | it-IT | Italian | Latin | No | IT, CH | I18N-P2b plug-in |
| Wave 1b | pt-PT, pt-BR | Portuguese | Latin | No | PT, BR | I18N-P2b plug-in |
| Wave 1b | ru-RU | Russian | Cyrillic | No | RU, CIS, diaspora | I18N-P2b plug-in; diaspora example (FR UI → switch to ru-RU) |
| Wave 2 | ar (+ regional variants) | Arabic | Arabic | Yes | MENA, diaspora | RTL sign-off mandatory |
| Wave 2 | hi-IN | Hindi | Devanagari | No | India, diaspora | Pairs with INR billing |
| Wave 2 | ja-JP | Japanese | CJK | No | Japan | UI density / fonts |
| Wave 3 | ko-KR | Korean | Hangul | No | Korea | |
| Wave 3 | zh-TW, zh-HK | Traditional Chinese | CJK | No | TW, HK, diaspora | Not zh-CN until legal review |
Simplified Chinese (zh-CN): Excluded until mainland sovereignty, licensing, and health-data rules are assessed.
9. Architecture target
Section titled “9. Architecture target”Aligned with 01-ARCHITECTURE.md:
Default locale: en-AU for platform, tenant default, and ultimate runtime fallback (REQ-I18N-03).
Effective locale resolution order:
users.locale_override(language switcher / Settings)- Else
tenants.locale - Else browser
navigator.languages/Accept-Language(first visit only) - Else country hint (Cloudflare
CF-IPCountryor the existing IP pricing lookup), only where config defines a default locale for that country - 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).
10. Delivery programme (roadmap phases)
Section titled “10. Delivery programme (roadmap phases)”Mapped to 04-ROADMAP §15.
| Phase | Scope | Exit 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 behavior | App 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; LanguageSwitcher | User 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 + enable | Locales in picker; CI coverage pass each |
| I18N-P2b — Plug-ins (batch 2) | REQ-I18N-33; nl-*, it-IT, pt-*, ru-RU l10n + enable | Same; Cyrillic smoke for ru-RU |
| I18N-P0v — English variants | en-GB, en-US, … as extends overrides only | Optional; not blocking FR |
| I18N-M1 — Marketing language | REQ-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 polish | REQ-I18N-17; C7 per enabled locale; REQ-I18N-18…19 deferred | Register R2 alignment for shipped locales |
| I18N-P4 — Wave 2+ | RTL (Arabic); Hindi, Japanese; Wave 3 | RTL hybrid QA; CJK font/density gates |
| I18N-BE — Backend l10n | REQ-I18N-11 push/email/API errors | May 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.
11. Testing and QA
Section titled “11. Testing and QA”| Test | When | Gate |
|---|---|---|
locale_coverage.json (CI) | Every PR touching locales; block enabled: true if below §7.8 thresholds | REQ-I18N-34 |
| Pseudo-localisation | Before enabling each new locale | Max 150% string length (UI chrome); 200% (labels/buttons) |
| Language switcher E2E | I18N-P1 | Select FR → UI French; reload → still French; second user keeps tenant default |
| Missing-key smoke | P0+ | Force missing key → [MISSING: …] or en-AU; no blank/error boundary |
| Lazy-load failure | P1+ | Simulate slow/failed chunk → en-AU within 3s (REQ-I18N-35) |
| RTL visual checklist | Wave 2 — nav, modals, forms, tooltips | Native QA + mirror automation |
| CJK font/line-height | Wave 2 ja-JP | System stack (Noto Sans CJK, platform fonts) |
| Tier 3 scales | Each locale | English fallback when no validated translation |
dir="auto" scope | P0+ | User inputs only — not frame labels or platform-generated strings |
| 22-PRODUCTION-MANUAL-QA.md | Per locale at enable | Smoke appendix row |
12. Marketing and app boundary
Section titled “12. Marketing and app boundary”| Surface | i18n programme |
|---|---|
app.lyncareos.com | Full programme — switcher (REQ-I18N-21…25) + namespaces |
lyncareos.com marketing | Language 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 Checkout | Stripe-localised checkout UI; LynCareOS controls allowed countries and price IDs |
REQ-I18N-32 — Marketing localisation programme
Section titled “REQ-I18N-32 — Marketing localisation programme”| ID | Requirement | Status |
|---|---|---|
| REQ-I18N-32 | Marketing (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-32a | Marketing 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 |
13. Non-functional requirements
Section titled “13. Non-functional requirements”| ID | Requirement | Status |
|---|---|---|
| NFR-11 | Frame translated; content not; plain default; new locale = files + config + Stripe without code changes; marketing hreflang when ≥2 marketing locales (REQ-I18N-32a) | Future |
| NFR-12 | Logical CSS properties; RTL-ready from first i18n merge | Future |
14. Document maintenance
Section titled “14. Document maintenance”When adding REQ-I18N-*:
- Add row to this document and 02-REQUIREMENTS.md §7.35.
- Add row to 31-REQUIREMENTS-CODE-MARKETING-RECONCILIATION.md §2.41.
- Update 04-ROADMAP §15.
- Update architecture diagram in 01-ARCHITECTURE.md if stack changes.
Document history
Section titled “Document history”| Date | Version | Change |
|---|---|---|
| 2026-08-06 | 1.11 | I18N-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-03 | 1.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-03 | 1.7 | Product: 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-03 | 1.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-04 | 1.5 | Build 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-02 | 1.4 | Removed §14 open decisions (resolved items are requirements only); REQ-I18N-32 marketing programme; no priority-locale proof list. |
| 2026-06-02 | 1.3 | REQ-I18N-31 alphabetical picker; flagEmoji + native descriptor. |
| 2026-06-02 | 1.2 | REQ-I18N-26…30 — marketing Language switcher (all enabled locales, VPN-safe manual override); I18N-M1 phase. |
| 2026-06-02 | 1.1 | Renumbered from doc 33 to 03 — aligns under master requirements (doc 02). |
| 2026-06-02 | 1.0 | Initial 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. |