blog-translate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Blog 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 from
claude-blog-multilingual
by Chris Mueller (Pro Hub Challenge, March 2026). Original: https://github.com/Chriss54/multilingual-int
将现有博客文章翻译成一种或多种目标语言。与通用翻译不同,此技能生成经过SEO优化、可直接发布的内容,包含本地化关键词、元标签和符合文化习惯的格式。
改编自Chris Mueller的
claude-blog-multilingual
(Pro Hub挑战赛,2026年3月)。原项目:https://github.com/Chriss54/multilingual-int

Key References

关键参考资料

Load on demand:
  • references/translation-rules.md
    , format preservation, number/date/currency formats per locale, quote handling, quality criteria.
  • references/cultural-adaptation.md
    , cultural profiles per locale (DACH, Francophone, Hispanic, Japanese, custom). This file is shared with
    blog-localize
    (do not duplicate).
按需加载:
  • references/translation-rules.md
    :格式保留、各地区数字/日期/货币格式、引号处理、质量标准。
  • references/cultural-adaptation.md
    :各地区文化概况(DACH、法语区、西班牙语区、日语区、自定义)。此文件与
    blog-localize
    共享(请勿重复)。

Workflow

工作流程

Phase 1: Input Parsing

阶段1:输入解析

  1. Read the source file (markdown, MDX, or HTML).
  2. Auto-detect source language. Order of preference:
    • Frontmatter
      lang
      field.
    • HTML
      lang
      attribute.
    • Content analysis (script, common stop words).
  3. Parse target languages from
    --to
    as comma-separated ISO 639-1 codes (
    de,fr,es,ja,pt-BR
    ). If
    --to
    is missing, ask the user once: "Which languages should I translate to? Provide ISO 639-1 codes (e.g., de, fr, es, ja, pt-BR)."
  4. Validate every code. Reject invalid ones with a suggestion (
    jp
    becomes "Did you mean
    ja
    for Japanese?"). If a target equals the source language, skip it with a notice.
  1. 读取源文件(markdown、MDX或HTML格式)。
  2. 自动检测源语言,优先级顺序:
    • 前置元数据(frontmatter)中的
      lang
      字段。
    • HTML的
      lang
      属性。
    • 内容分析(脚本、常用停用词)。
  3. --to
    参数中解析目标语言,格式为逗号分隔的ISO 639-1代码(如
    de,fr,es,ja,pt-BR
    )。如果缺少
    --to
    参数,询问用户一次:“我应该翻译成哪些语言?请提供ISO 639-1代码(例如:de, fr, es, ja, pt-BR)。”
  4. 验证每个代码。拒绝无效代码并给出建议(例如
    jp
    会提示“您是不是指日语的
    ja
    ?”)。如果目标语言与源语言相同,则跳过并通知用户。

Phase 2: Content Analysis

阶段2:内容分析

Extract the translatable surface:
  • Frontmatter:
    title
    ,
    description
    ,
    tags
    ,
    author
    (only when translatable, e.g. role labels, not personal names).
  • All headings (H1, H2, H3).
  • Body paragraphs.
  • Image
    alt
    text and
    <figcaption>
    content.
  • Chart
    <text>
    and
    <tspan>
    content; preserve every SVG attribute (
    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>
    <tspan>
    内容;保留所有SVG属性(
    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:
  1. Decide whether the source keyword is the established term in the target market. If yes (e.g., "Content Marketing" stays in German), keep it.
  2. If a local equivalent has real search behavior, swap to it.
  3. Apply the same logic to secondary keywords.
  4. Record the mapping. The translator agent uses it to update title, meta description, and H2 headings consistently.
针对每种目标语言:
  1. 判断源关键词是否为目标市场的通用术语。如果是(例如“Content Marketing”在德语中保留原样),则保留。
  2. 如果当地有具备真实搜索量的等效术语,则替换为该术语。
  3. 对次要关键词应用相同逻辑。
  4. 记录映射关系。翻译Agent将使用此映射一致地更新标题、元描述和H2标题。

Phase 4: Translation

阶段4:翻译

Spawn the
blog-translator
agent (via Task) for each target language with:
  • The source content.
  • The keyword localization map from Phase 3.
  • The target language code.
  • Pointers to
    references/translation-rules.md
    and the cultural profile in
    references/cultural-adaptation.md
    if one exists for the target locale.
Run agents in parallel when translating into multiple languages.
The agent returns the fully translated post in the same format as the input.
为每种目标语言生成
blog-translator
Agent(通过Task调用),传入:
  • 源内容。
  • 阶段3生成的关键词本地化映射。
  • 目标语言代码。
  • references/translation-rules.md
    的指针,以及目标地区对应的
    references/cultural-adaptation.md
    中的文化概况(如果存在)。
当翻译多种语言时,并行运行Agent。
Agent将返回与输入格式完全一致的完整翻译文章。

Phase 5: Post-Processing

阶段5:后处理

For each translated version:
  1. Add or update locale frontmatter:
    yaml
    lang: "de"
    translatedFrom: "en"
    translatedDate: "YYYY-MM-DD"
    slug: "wie-man-ki-slop-vermeidet"
  2. 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.
  3. Save translated files:
    translations/
      {lang}/{localized-slug}.{ext}
    When invoked from
    blog-multilingual
    , save into
    multilingual/{lang}/{localized-slug}.{ext}
    instead.
针对每个翻译版本:
  1. 添加或更新地区前置元数据:
    yaml
    lang: "de"
    translatedFrom: "en"
    translatedDate: "YYYY-MM-DD"
    slug: "wie-man-ki-slop-vermeidet"
  2. 验证结构完整性:
    • H2和H3章节数量与原文一致。
    • 所有图片均存在且带有翻译后的alt文本。
    • 所有SVG图表均存在且带有翻译后的文本标签(长度调整:德语+30%,法语+15%,日语-20%,其他语言参见
      references/translation-rules.md
      )。
    • FAQ数量与原文匹配。
    • 每个H2章节中均包含引用模块。
  3. 保存翻译文件:
    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:交付

undefined
undefined

Translation complete: [Original title]

翻译完成:[原标题]

Source

源文件信息

  • Language: [source]
  • File: [source path]
  • 语言:[源语言]
  • 文件:[源文件路径]

Translations

翻译结果

LanguageFileKeywords adaptedStatus
detranslations/de/{slug}.md[N]ok
frtranslations/fr/{slug}.md[N]ok
语言文件关键词适配情况状态
detranslations/de/{slug}.md[N]ok
frtranslations/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
    /blog localize <file> --locale <code>
    for cultural deep-adaptation.
  • Run
    /blog locale-audit translations/
    to verify completeness.
  • Use
    /blog multilingual
    to combine write, translate, localize, hreflang in one command.
undefined
  • 运行
    /blog localize <file> --locale <code>
    进行深度文化适配。
  • 运行
    /blog locale-audit translations/
    验证完整性。
  • 使用
    /blog multilingual
    将撰写、翻译、本地化、hreflang整合为一条命令执行。
undefined

Error Handling

错误处理

ScenarioAction
Unsupported language codeSuggest the correct ISO 639-1 code
Source equals a targetSkip with "Source is already in [lang]"
File not foundReport error with suggested path
Translator agent timeoutRetry once, then report partial results
Binary or non-text fileReport 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>