Nextjs Shadcn I18n Workflow
Workflow
- •Confirm route and locale model. Document App Router segments, locale prefixes, and default fallback behavior.
- •Implement UI with shared primitives. Prefer shared components and variant patterns over page-local custom markup.
- •Keep i18n contract strict. Require translation keys for all user-facing text and ensure locale file parity.
- •Validate build and runtime.
Run
npm run lintandnpm run build. Check locale switch navigation and SSR hydration consistency. - •Guard against regressions. Add tests for locale routing, missing key fallback, and critical interactive flows.
Output Contract
Always include:
- •Routes and locales touched.
- •New translation keys and files updated.
- •Build or lint verification status.
- •UI consistency and accessibility notes.