Skill: Internationalization (i18n) Enforcement

> **Skill ID**: `SKILL_I18N`

23 stars

Best use case

Skill: Internationalization (i18n) Enforcement is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

> **Skill ID**: `SKILL_I18N`

Teams using Skill: Internationalization (i18n) Enforcement should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/i18n/SKILL.md --create-dirs "https://raw.githubusercontent.com/wangjianjq/Skill/main/.agents/skills/i18n/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/i18n/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Skill: Internationalization (i18n) Enforcement Compares

Feature / AgentSkill: Internationalization (i18n) EnforcementStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

> **Skill ID**: `SKILL_I18N`

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Skill: Internationalization (i18n) Enforcement

> **Skill ID**: `SKILL_I18N`
> **Tags**: `i18n`, `multi-language`, `localization`
> **Version**: 1.0

## 1. The i18n Gate (Mandatory Protocol)

**Trigger**: Whenever the project requires multi-language support or when modifying existing localized features.

### 1.1 Language Discovery (Initialization)

If internationalization is required but no language list exists:

- **Rule**: The AI MUST ask: "Which languages do you want this project to support? (e.g., English, Chinese, Japanese)".
- **Action**: Create a file named `PROJECT_LANGUAGES.md` in the project root with the confirmed list.

**Format for `PROJECT_LANGUAGES.md`**:

```markdown
# Project Supported Languages
- [x] English (en)
- [x] Chinese (zh-CN)
...
```

### 1.2 Mandatory Retrieval (Execution)

- **Constraint**: Before ANY code generation or modification, the AI **MUST** read `PROJECT_LANGUAGES.md`.
- **Enforcement**: Ensure that every new feature, UI string, or functional content is adapted to ALL languages listed in the markdown file.

## 2. Technical Implementation Standards

- **Rule 1**: Avoid hardcoding strings in the UI. Use resources/localization files (e.g., `i18n.json`, `gettext`, or platform-specific resources).
- **Rule 2**: If the user project uses a specific i18n framework (e.g., `react-i18next`, `intl`, `gettext`), adhere strictly to that framework's patterns.
- **Rule 3**: New languages added to `PROJECT_LANGUAGES.md` later require a "Retroactive Adaptation" check for existing features.

## 3. Verification

- After implementation, verify that the translation files/resources for ALL listed languages have been updated consistently.