blog-translate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBlog Translate, SEO-Optimized Blog Translation
博客翻译(Blog Translate):SEO优化的博客翻译
Translates an existing blog post into one or more target languages. Unlike
generic translation, this skill produces SEO-optimized, publication-ready
content with localized keywords, meta tags, and culturally correct
formatting.
Adapted fromby Chris Mueller (Pro Hub Challenge, March 2026). Original: https://github.com/Chriss54/multilingual-intclaude-blog-multilingual
将现有博客文章翻译成一种或多种目标语言。与通用翻译不同,此技能生成经过SEO优化、可直接发布的内容,包含本地化关键词、元标签和符合文化习惯的格式。
改编自Chris Mueller的(Pro Hub挑战赛,2026年3月)。原项目:https://github.com/Chriss54/multilingual-intclaude-blog-multilingual
Key References
关键参考资料
Load on demand:
- , format preservation, number/date/currency formats per locale, quote handling, quality criteria.
references/translation-rules.md - , cultural profiles per locale (DACH, Francophone, Hispanic, Japanese, custom). This file is shared with
references/cultural-adaptation.md(do not duplicate).blog-localize
按需加载:
- :格式保留、各地区数字/日期/货币格式、引号处理、质量标准。
references/translation-rules.md - :各地区文化概况(DACH、法语区、西班牙语区、日语区、自定义)。此文件与
references/cultural-adaptation.md共享(请勿重复)。blog-localize
Workflow
工作流程
Phase 1: Input Parsing
阶段1:输入解析
- Read the source file (markdown, MDX, or HTML).
- Auto-detect source language. Order of preference:
- Frontmatter field.
lang - HTML attribute.
lang - Content analysis (script, common stop words).
- Frontmatter
- Parse target languages from as comma-separated ISO 639-1 codes (
--to). Ifde,fr,es,ja,pt-BRis missing, ask the user once: "Which languages should I translate to? Provide ISO 639-1 codes (e.g., de, fr, es, ja, pt-BR)."--to - Validate every code. Reject invalid ones with a suggestion (becomes "Did you mean
jpfor Japanese?"). If a target equals the source language, skip it with a notice.ja
- 读取源文件(markdown、MDX或HTML格式)。
- 自动检测源语言,优先级顺序:
- 前置元数据(frontmatter)中的字段。
lang - HTML的属性。
lang - 内容分析(脚本、常用停用词)。
- 前置元数据(frontmatter)中的
- 从参数中解析目标语言,格式为逗号分隔的ISO 639-1代码(如
--to)。如果缺少de,fr,es,ja,pt-BR参数,询问用户一次:“我应该翻译成哪些语言?请提供ISO 639-1代码(例如:de, fr, es, ja, pt-BR)。”--to - 验证每个代码。拒绝无效代码并给出建议(例如会提示“您是不是指日语的
jp?”)。如果目标语言与源语言相同,则跳过并通知用户。ja
Phase 2: Content Analysis
阶段2:内容分析
Extract the translatable surface:
- Frontmatter: ,
title,description,tags(only when translatable, e.g. role labels, not personal names).author - All headings (H1, H2, H3).
- Body paragraphs.
- Image text and
altcontent.<figcaption> - Chart and
<text>content; preserve every SVG attribute (<tspan>,x,y,font-size,fill).transform - FAQ questions and answers.
- Citation capsule text.
- Key Takeaways or summary box.
- CTA text.
- Internal-link zone anchor text.
Preserve unchanged:
- Markdown and HTML structure, tags, attributes.
- Image URLs, link URLs, frontmatter keys.
- Code blocks (translate inline comments only when meaningful).
- Internal-link zone markers ().
[INTERNAL-LINK: ...] - Source organization names in citations (Gartner, McKinsey, etc.).
- Person names.
- Schema JSON-LD blocks (translate only the user-facing string values).
Identify the primary and secondary keywords for Phase 3.
提取可翻译内容:
- 前置元数据:、
title、description、tags(仅当可翻译时,例如职位标签,而非人名)。author - 所有标题(H1、H2、H3)。
- 正文段落。
- 图片的文本和
alt内容。<figcaption> - 图表的和
<text>内容;保留所有SVG属性(<tspan>、x、y、font-size、fill)。transform - FAQ的问题和答案。
- 引用模块文本。
- 要点总结或摘要框。
- CTA文本。
- 内部链接区域的锚文本。
保留无需修改的内容:
- Markdown和HTML结构、标签、属性。
- 图片URL、链接URL、前置元数据键。
- 代码块(仅在有意义时翻译行内注释)。
- 内部链接区域标记()。
[INTERNAL-LINK: ...] - 引用中的来源机构名称(如Gartner、McKinsey等)。
- 人名。
- JSON-LD模式块(仅翻译面向用户的字符串值)。
确定阶段3所需的主要和次要关键词。
Phase 3: Keyword Localization
阶段3:关键词本地化
For each target language:
- Decide whether the source keyword is the established term in the target market. If yes (e.g., "Content Marketing" stays in German), keep it.
- If a local equivalent has real search behavior, swap to it.
- Apply the same logic to secondary keywords.
- Record the mapping. The translator agent uses it to update title, meta description, and H2 headings consistently.
针对每种目标语言:
- 判断源关键词是否为目标市场的通用术语。如果是(例如“Content Marketing”在德语中保留原样),则保留。
- 如果当地有具备真实搜索量的等效术语,则替换为该术语。
- 对次要关键词应用相同逻辑。
- 记录映射关系。翻译Agent将使用此映射一致地更新标题、元描述和H2标题。
Phase 4: Translation
阶段4:翻译
Spawn the agent (via Task) for each target language with:
blog-translator- The source content.
- The keyword localization map from Phase 3.
- The target language code.
- Pointers to and the cultural profile in
references/translation-rules.mdif one exists for the target locale.references/cultural-adaptation.md
Run agents in parallel when translating into multiple languages.
The agent returns the fully translated post in the same format as the input.
为每种目标语言生成 Agent(通过Task调用),传入:
blog-translator- 源内容。
- 阶段3生成的关键词本地化映射。
- 目标语言代码。
- 的指针,以及目标地区对应的
references/translation-rules.md中的文化概况(如果存在)。references/cultural-adaptation.md
当翻译多种语言时,并行运行Agent。
Agent将返回与输入格式完全一致的完整翻译文章。
Phase 5: Post-Processing
阶段5:后处理
For each translated version:
- Add or update locale frontmatter:
yaml
lang: "de" translatedFrom: "en" translatedDate: "YYYY-MM-DD" slug: "wie-man-ki-slop-vermeidet" - Verify structural integrity:
- Same number of H2 and H3 sections as the original.
- All images present with translated alt text.
- All SVG charts present with translated text labels (length-adjusted:
DE +30%, FR +15%, JA -20%, others see ).
references/translation-rules.md - FAQ count matches.
- Citation capsules present in each H2.
- Save translated files:
When invoked from
translations/ {lang}/{localized-slug}.{ext}, save intoblog-multilingualinstead.multilingual/{lang}/{localized-slug}.{ext}
针对每个翻译版本:
- 添加或更新地区前置元数据:
yaml
lang: "de" translatedFrom: "en" translatedDate: "YYYY-MM-DD" slug: "wie-man-ki-slop-vermeidet" - 验证结构完整性:
- H2和H3章节数量与原文一致。
- 所有图片均存在且带有翻译后的alt文本。
- 所有SVG图表均存在且带有翻译后的文本标签(长度调整:德语+30%,法语+15%,日语-20%,其他语言参见)。
references/translation-rules.md - FAQ数量与原文匹配。
- 每个H2章节中均包含引用模块。
- 保存翻译文件:
当从
translations/ {lang}/{localized-slug}.{ext}调用时,保存到blog-multilingual。multilingual/{lang}/{localized-slug}.{ext}
Phase 6: Translation-Quality Guardrails
阶段6:翻译质量管控
Scan the output for machine-translation artifacts before reporting done:
- Literal idioms (English idioms transliterated, not adapted).
- Unnatural word order (SOV translated as SVO into a non-SVO language, or the reverse).
- Mixed-language sentences (other than established loanwords).
- Number, date, or currency strings still in source format.
- Frontmatter strings still in the source language.
Flag every issue inline (file path, line number, fix suggestion). The
translator agent should re-pass any flagged passage before delivery.
在完成报告前,扫描输出内容以查找机器翻译瑕疵:
- 直译习语(英语习语被音译而非适配)。
- 不自然的语序(SOV语言被翻译成SVO语序,或反之)。
- 混合语言句子(通用外来词除外)。
- 数字、日期或货币字符串仍为源语言格式。
- 前置元数据字符串仍为源语言。
在每个问题处标记位置(文件路径、行号、修复建议)。翻译Agent应重新处理所有标记的段落后再交付。
Phase 7: Delivery
阶段7:交付
undefinedundefinedTranslation complete: [Original title]
翻译完成:[原标题]
Source
源文件信息
- Language: [source]
- File: [source path]
- 语言:[源语言]
- 文件:[源文件路径]
Translations
翻译结果
| Language | File | Keywords adapted | Status |
|---|---|---|---|
| de | translations/de/{slug}.md | [N] | ok |
| fr | translations/fr/{slug}.md | [N] | ok |
| 语言 | 文件 | 关键词适配情况 | 状态 |
|---|---|---|---|
| de | translations/de/{slug}.md | [N] | ok |
| fr | translations/fr/{slug}.md | [N] | ok |
Quality checks
质量检查
- Structural integrity: pass / fail per language
- Meta tags localized: pass / fail per language
- Numbers, dates, currencies formatted per locale: pass / fail
- Keywords localized: [N] keywords adapted
- Machine-translation artifacts flagged: [N] (see notes above)
- 结构完整性:各语言通过/未通过
- 元标签本地化:各语言通过/未通过
- 数字、日期、货币格式符合地区要求:通过/未通过
- 关键词本地化:[N]个关键词已适配
- 机器翻译瑕疵标记数量:[N](见上方说明)
Next steps
后续步骤
- Run for cultural deep-adaptation.
/blog localize <file> --locale <code> - Run to verify completeness.
/blog locale-audit translations/ - Use to combine write, translate, localize, hreflang in one command.
/blog multilingual
undefined- 运行进行深度文化适配。
/blog localize <file> --locale <code> - 运行验证完整性。
/blog locale-audit translations/ - 使用将撰写、翻译、本地化、hreflang整合为一条命令执行。
/blog multilingual
undefinedError Handling
错误处理
| Scenario | Action |
|---|---|
| Unsupported language code | Suggest the correct ISO 639-1 code |
| Source equals a target | Skip with "Source is already in [lang]" |
| File not found | Report error with suggested path |
| Translator agent timeout | Retry once, then report partial results |
| Binary or non-text file | Report error, suggest correct file |
| 场景 | 操作 |
|---|---|
| 不支持的语言代码 | 建议正确的ISO 639-1代码 |
| 目标语言与源语言相同 | 跳过并提示“源语言已为[lang]” |
| 文件未找到 | 报告错误并建议路径 |
| 翻译Agent超时 | 重试一次,然后报告部分结果 |
| 二进制或非文本文件 | 报告错误,建议提供正确文件 |
Cross-References
交叉引用
- Next step (cultural depth):
/blog localize <file> --locale <code> - QA sweep across all language versions:
/blog locale-audit <directory> - One-command pipeline:
/blog multilingual <topic> --languages <codes>
- 下一步(文化深度适配):
/blog localize <file> --locale <code> - 多语言版本QA扫描:
/blog locale-audit <directory> - 一站式流程命令:
/blog multilingual <topic> --languages <codes>