feat(admin-i18n): add cookie-based locale runtime and switcher baseline

This commit is contained in:
2026-02-10 20:56:03 +01:00
parent 07e5f53793
commit b618c8cb51
18 changed files with 931 additions and 156 deletions

View File

@ -2,19 +2,20 @@
## Scope
MVP0 introduces i18n runtime only for the public app (`@cms/web`) using `next-intl`.
MVP0 introduces i18n runtime baselines for both apps.
Current baseline:
- Shared locale contract in `@cms/i18n` (`de`, `en`, `es`, `fr`; default `en`)
- Path-stable routing (no locale in URL) via `apps/web/src/proxy.ts`
- Message loading through `apps/web/src/i18n/request.ts`
- Locale-aware navigation helpers in `apps/web/src/i18n/navigation.ts`
- Public language switcher component backed by Zustand store
- Public app: path-stable routing (no locale in URL) via `apps/web/src/proxy.ts`
- Public app: message loading through `apps/web/src/i18n/request.ts`
- Public app: locale-aware navigation helpers in `apps/web/src/i18n/navigation.ts`
- Public app: language switcher component backed by Zustand store
- Admin app: cookie-based locale resolution and message loading in root layout
- Admin app: runtime i18n provider (`AdminI18nProvider`) and locale switcher UI
## Notes
- Public app locale is resolved through `next-intl` middleware + cookie.
- Enabled locales are currently static in code and will later be managed from admin settings.
- Admin app i18n provider/message loading is still pending.
- Translation key conventions and workflow docs are tracked in `TODO.md`.