All skills
github avatar

/next-intl-add-language

@caab1f6 official
by githubgithub/awesome-copilot40k stars
5,040

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

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/next-intl-add-language

This session only. Nothing lands on disk.

SKILL.md

≈19 tokens always: the name and description. ≈161 when used: this file.

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.

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides standard instructions for adding a new language to a Next.js application using the next-intl library. It does not contain any executable code, network operations, or access to sensitive files.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    1/1 file flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at caab1f6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 17 hours ago.

Activeupdated 7 months ago

README badge

README badge for github/awesome-copilot/next-intl-add-language

Adds a new language to a Next.js application using next-intl by creating translation files, updating routing configuration, and adding the language to the UI toggle component. Targets projects already using next-intl for internationalization with translations stored in a `./messages` directory.

Generated from the current SKILL.md.

Does this skill work with any i18n library or just next-intl?
Just next-intl. The skill assumes your Next.js project uses next-intl for internationalization and modifies next-intl-specific files like routing.ts and middleware.ts.
Where do I store the translation files?
All translations go in the ./messages directory. You translate en.json as a template and create a new language file in the same location.
What files do I need to update to add a new language?
Three files: routing.ts (add the locale path), middleware.ts (update middleware configuration), and language-toggle.tsx (add the language to the UI toggle). You also create a new translation JSON file in ./messages.

Generated from the current SKILL.md. These answers refresh after source changes.