nextjs-i18n

Installation
SKILL.md

Internationalization (i18n)

Priority: P2 (MEDIUM)

Maintain single source of truth for locales and ensure SEO-friendly sub-path routing.

Workflow: Add i18n to Next.js App Router Project

  1. Install next-intl and create messages/en.json, messages/fr.json, etc.
  2. Add locale detection middleware in middleware.ts
  3. Create app/[lang]/layout.tsx with locale param
  4. Load translations server-side via getMessages()
  5. Add hreflang tags in generateMetadata
  6. Pre-render locales with generateStaticParams
  7. Verify: run next build and confirm all locale paths render

Middleware Example

See implementation examples

Installs
1
GitHub Stars
521
First Seen
14 days ago
nextjs-i18n — hoangnguyen0403/agent-skills-standard