plugins/nextjs-expert/skills/nextjs-i18n/SKILL.md
Next.js 16 internationalization with next-intl or DIY. Use when implementing i18n, translations, localization, multilingual, language switch, locale routing, or formatters.
npx skillsauth add fusengine/agents nextjs-i18nInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Complete i18n solution with next-intl or DIY dictionary approach.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
[locale] dynamic segment| Feature | Benefit | |---------|---------| | App Router native | Full Server Components support | | Type-safe messages | TypeScript autocompletion for keys | | ICU MessageFormat | Pluralization, gender, select expressions | | Async message loading | Load translations on-demand per locale | | proxy.ts compatible | Works with Next.js 16 proxy pattern | | Rich formatting | Dates, numbers, lists, relative time |
Full-featured library with routing, formatting, and type safety. Best for production applications needing comprehensive i18n support.
Lightweight approach using dynamic imports for simple translation needs. Good for projects wanting minimal dependencies.
All i18n code organized in modules/cores/i18n/:
src/modules/cores/i18n/src/config/routing.ts - Locale routing configsrc/modules/cores/i18n/messages/en.json - English translationssrc/modules/cores/i18n/messages/fr.json - French translationsproxy.ts - Locale detection and redirect logicAll routes prefixed with [locale] dynamic segment:
/en/about → English about page/fr/about → French about page/ → Redirects to default localeUse localized navigation from next-intl for automatic locale handling:
| Need | Reference | |------|-----------| | Initial setup | installation.md, routing-setup.md | | Route config | routing-config.md, middleware-proxy.md | | Translations | translations.md, messages-validation.md | | Formatting | formatting.md | | Components | server-components.md, client-components.md | | Navigation | navigation.md | | TypeScript | typescript.md | | SEO | seo.md | | Testing | testing.md | | DIY approach | diy-dictionaries.md, diy-locale-detection.md |
{count, plural, one {# item} other {# items}}{gender, select, male {He} female {She} other {They}}dir attribute for right-to-left languagesLocalized error and loading states require specific handling:
[locale]/error.tsx - Localized error boundary[locale]/not-found.tsx - Localized 404 pageglobal-error.tsx - Root error fallbackSee error-files.md for complete patterns.
testing
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.