feat(web-i18n): add es/fr locales and expand switcher locale set
This commit is contained in:
@ -20,6 +20,7 @@ export default defineConfig({
|
||||
{ text: "Getting Started", link: "/getting-started" },
|
||||
{ text: "Architecture", link: "/architecture" },
|
||||
{ text: "Better Auth Baseline", link: "/product-engineering/auth-baseline" },
|
||||
{ text: "i18n Baseline", link: "/product-engineering/i18n-baseline" },
|
||||
{ text: "RBAC And Permissions", link: "/product-engineering/rbac-permission-model" },
|
||||
{ text: "Workflow", link: "/workflow" },
|
||||
],
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
- `packages/db`: prisma + data access
|
||||
- `packages/content`: shared schemas and domain contracts
|
||||
- `packages/ui`: shared UI layer
|
||||
- `packages/i18n`: shared locale definitions and i18n helpers
|
||||
- `packages/config`: shared TS config
|
||||
|
||||
## Design Principles
|
||||
@ -14,6 +15,7 @@
|
||||
- Shared contracts before feature implementation
|
||||
- RBAC and CRUD base as prerequisites for MVP1 feature work
|
||||
- Keep admin and public responsibilities clearly separated
|
||||
- Public routing is path-stable; locale is resolved via `next-intl` middleware + cookie
|
||||
|
||||
## Pending Documentation
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ bun run dev
|
||||
```
|
||||
|
||||
- Web: `http://localhost:3000`
|
||||
- Web locale switching: use the language switcher in the page header
|
||||
- Admin: `http://localhost:3001`
|
||||
- Admin welcome (first start): `http://localhost:3001/welcome`
|
||||
- Admin login: `http://localhost:3001/login`
|
||||
|
||||
20
docs/product-engineering/i18n-baseline.md
Normal file
20
docs/product-engineering/i18n-baseline.md
Normal file
@ -0,0 +1,20 @@
|
||||
# i18n Baseline
|
||||
|
||||
## Scope
|
||||
|
||||
MVP0 introduces i18n runtime only for the public app (`@cms/web`) using `next-intl`.
|
||||
|
||||
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
|
||||
|
||||
## 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`.
|
||||
Reference in New Issue
Block a user