github avatar

Next Intl Add Language

This automates the tedious process of adding new languages to Next.js apps using next-intl. It handles the complete workflow: duplicates your English translations to create the new language JSON file, updates the routing configuration in both routing.ts and middleware.ts, and modifies your language toggle component to include the new option. Saves you from manually tracking down all the scattered config files and ensures you don't miss any steps. Most useful when you're scaling from a single language to multiple locales and want to avoid the inevitable "why isn't my new language showing up" debugging session.

skills.sh installs
9.4K
GitHub stars
41K
last updated
Aug 21, 2026

Install

$ npx -y skills add github/awesome-copilot --skill next-intl-add-language --agent claude-code

Installs into .claude/skills of the current project.

Files

This is a guide to add a new language to a Next.js project using next-intl for internationalization,

  • For i18n, the application uses next-intl.
  • All translations are in the directory ./messages.
  • The UI component is src/components/language-toggle.tsx.
  • Routing and middleware configuration are handled in:
    • src/i18n/routing.ts
    • src/middleware.ts

When adding a new language:

  • Translate all the content of en.json to the new language. The goal is to have all the JSON entries in the new language for a complete translation.
  • Add the path in routing.ts and middleware.ts.
  • Add the language to language-toggle.tsx.

Sponsors

Details

Repository
github.com/github/awesome-copilot
Categories
Frontend Development, Git & Pull Requests, AI & Agent Building

More from github/awesome-copilot

All 318
1openai avatarplaywrightopenai/skillsUse when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) vi9.3Kskills.sh installs
2alwaysmeticulous avatarmeticulous-simulate-and-diffalwaysmeticulous/skillsRun a Meticulous session simulation against a live URL and analyze the visual output — either by inspecting screenshots directly (quick-check mode) or by compar8.9Kskills.sh installs
3anthropics avatarplaygroundanthropics/claude-plugins-officialCreates interactive HTML playgrounds — self-contained single-file explorers that let users configure something visually through controls, see a live preview, an8.6Kskills.sh installs
4vercel-labs avatardevtoolsvercel-labs/json-renderDrop-in inspector panel for any json-render app. Use when the user wants to debug a generative UI, inspect the spec tree, edit state at runtime, see dispatched 8.4Kskills.sh installs
5payloadcms avatarpayloadpayloadcms/skillsUse when working with Payload projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, secur7.1Kskills.sh installs
6affaan-m avatarcoding-standardsaffaan-m/eccBaseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-7Kskills.sh installs