Translate English Markdown into professional, accurate Chinese while preserving Markdown structure, code blocks, links, tables, and technical terms. Use when the user asks for one-click EN->ZH Markdown conversion for single files or directories.
Use this skill for high-quality English-to-Chinese Markdown translation with layout fidelity.
.md content from English to Chinese.references/glossary-template.csv.scripts/translate_markdown.ps1https://fanyi-api.baidu.com/ait/api/aiTextTranslate)BAIDU_TRANSLATE_APP_IDBAIDU_TRANSLATE_API_KEYbearer (Authorization header)llmscripts/qa_markdown_translation.ps1Set Baidu Translate credentials (Windows PowerShell):
setx BAIDU_TRANSLATE_APP_ID "your_baidu_appid"
setx BAIDU_TRANSLATE_API_KEY "your_baidu_appkey"
Translate one file in place:
pwsh ./scripts/translate_markdown.ps1 `
-Path "D:\docs\spec.md" `
-InPlace `
-AppId $env:BAIDU_TRANSLATE_APP_ID `
-ApiKey $env:BAIDU_TRANSLATE_API_KEY `
-AuthMode bearer `
-ModelType llm `
-GlossaryCsv "./references/glossary-template.csv"
Translate a directory to another output root:
pwsh ./scripts/translate_markdown.ps1 `
-Path "D:\docs" `
-Recurse `
-OutputRoot "D:\docs_zh" `
-AppId $env:BAIDU_TRANSLATE_APP_ID `
-ApiKey $env:BAIDU_TRANSLATE_API_KEY `
-AuthMode bearer `
-ModelType llm `
-GlossaryCsv "./references/glossary-template.csv"
QA check:
pwsh ./scripts/qa_markdown_translation.ps1 `
-Source "D:\docs\spec.md" `
-Translated "D:\docs_zh\spec.md"
Read references/translation-style-guide.md for detailed style and term rules.