# Doc I18n

Bilingual documentation translation and synchronization for path-based i18n projects.

- Repository: https://github.com/YunYouJun/valaxy (1131 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add YunYouJun/valaxy --skill doc-i18n -g -a claude-code -y`
Codex: `npx skills add YunYouJun/valaxy --skill doc-i18n -g -a codex -y`
Cursor: `npx skills add YunYouJun/valaxy --skill doc-i18n -g -a cursor -y`
Gemini CLI: `npx skills add YunYouJun/valaxy --skill doc-i18n -g -a gemini-cli -y`

## Description

Bilingual documentation translation and synchronization for path-based i18n projects. This skill should be used when users need to translate, compare, or synchronize documentation between Chinese and English versions. Triggers include requests to translate docs, sync i18n, compare zh/en docs, translate this page, check translation coverage, or any task involving bilingual Markdown documentation alignment. Supports both zh-to-en and en-to-zh translation directions.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# doc-i18n: Bilingual Documentation Translation Skill

## Purpose

Translate, compare, and synchronize bilingual (Chinese / English) Markdown documentation in path-based i18n projects. Ensure structural alignment, content consistency, and adherence to project-specific conventions.

## When to Use

- Translating a documentation file from one language to another
- Comparing two language versions for content drift or missing sections
- Checking translation coverage across the documentation tree
- Fixing heading IDs, internal links, or container syntax after translation
- Creating a new translation file from an existing source

## Workflow

### Phase 1: Analyze

Before making any changes, analyze the task:

1. **Identify the source and target files.** Determine the translation direction:
   - English to Chinese: `docs/pages/{path}.md` to `docs/pages/zh/{path}.md`
   - Chinese to English: `docs/pages/zh/{path}.md` to `docs/pages/{path}.md`

2. **Read both files** (source and target). If the target file does not exist, note that a new file must be created.

3. **Generate a diff report** listing:
   - Headings present in source but missing/untranslated in target
   - Paragraphs or sections with untranslated content (e.g., Chinese text in the English file)
   - Structural differences (extra/missing sections, reordered content)
   - Code blocks or examples that differ
   - Internal link path issues (see Link Rules below)
   - Heading ID mismatches (see Heading ID Rules below)

4. **Present the report** to the user before proceeding. If the task is a full translation, proceed directly after the report.

### Phase 2: Translate

Apply translations following these rules:

#### Content Rules

The rest: https://github.com/YunYouJun/valaxy/blob/HEAD/.codebuddy/skills/doc-i18n/SKILL.md
