Web & Frontendlow risk

next-intl-add-language

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

github/awesome-copilot·skills/next-intl-add-language/SKILL.md
80/ 100质量分

导入这个 Skill

选择你的 coding agent,复制项目级或个人级安装命令。

固定到平台收录的 commit
导入当前项目.agents/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a codex -y
导入个人环境~/.agents/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a codex -g -y
手动放置目录.agents/skills/next-intl-add-languageOfficial docs ↗
导入当前项目.claude/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a claude-code -y
导入个人环境~/.claude/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a claude-code -g -y
手动放置目录.claude/skills/next-intl-add-languageOfficial docs ↗
导入当前项目.agents/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a github-copilot -y
导入个人环境~/.copilot/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a github-copilot -g -y
手动放置目录.agents/skills/next-intl-add-languageOfficial docs ↗
导入当前项目.agents/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a cursor -y
导入个人环境~/.cursor/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a cursor -g -y
手动放置目录.agents/skills/next-intl-add-languageOfficial docs ↗
导入当前项目.agents/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a gemini-cli -y
导入个人环境~/.gemini/skills/next-intl-add-language
npx skills add https://github.com/github/awesome-copilot/tree/0aaced533251f5b86c69dfbc5e55db74c4b4d1af/skills/next-intl-add-language -a gemini-cli -g -y
Native Gemini CLIgemini skills install https://github.com/github/awesome-copilot.git --scope workspace --path skills/next-intl-add-language
手动放置目录.agents/skills/next-intl-add-languageOfficial docs ↗
⚠ 安装命令使用开源 skills CLI。执行前请检查来源、脚本和权限。
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`.