Set up i18next with lazy per-route catalogs

Wire i18next into the compliance portal with a custom backend built on
import.meta.glob, so each _locales/*.json becomes its own lazily loaded
chunk keyed by a namespace derived from the folder path. The active
language is resolved from the browser, collapsing any fr*/en* tag to
fr-FR/en-US with en-US as the ultimate fallback; fallbackLng then only
covers individual missing keys.

Add an app-level default namespace catalog and switch the documents
page title to a translation key to exercise the lazy-loading path.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-28 13:54:24 +02:00
parent 6ec7efb4fc
commit 86077e6c27
8 changed files with 180 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
import { createRoot } from "react-dom/client";
import "./index.css";
import "#/lib/i18n/i18n";
import { App } from "./App";