@github/next-intl-add-language

Add new language to a Next.js + next-intl application

View in AI SkillSafe app
94714 downloads
0 stars
0 demos
SKILL.md
namenext-intl-add-language
descriptionAdd new language to a Next.js + next-intl application

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.

Embed badges

Add these to your README to show the skill's verification status.

SkillSafe verified badge
Verified badge
[![SkillSafe verified badge](https://api.skillsafe.ai/v1/badge/@github/next-intl-add-language/verified)](https://skillsafe.ai/skill/@github/next-intl-add-language/)
Installs badge
Installs badge
[![Installs badge](https://api.skillsafe.ai/v1/badge/@github/next-intl-add-language/installs)](https://skillsafe.ai/skill/@github/next-intl-add-language/)
Scan badge
Scan badge
[![Scan badge](https://api.skillsafe.ai/v1/badge/@github/next-intl-add-language/scan)](https://skillsafe.ai/skill/@github/next-intl-add-language/)
Eval pass rate badge
Eval pass rate
[![Eval pass rate badge](https://api.skillsafe.ai/v1/badge/@github/next-intl-add-language/eval)](https://skillsafe.ai/skill/@github/next-intl-add-language/)