make-site-multilingual
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGet a Site Ready for Rosey (+ the RCC)
让站点适配 Rosey(+ the RCC)
Step-by-step workflow for making a single-language site translatable with Rosey, and — optionally — wiring up the Rosey CloudCannon Connector (RCC) so editors can translate inline in CloudCannon's Visual Editor.
将单语言站点改造成可通过 Rosey 翻译的分步工作流,并可选择接入 Rosey CloudCannon Connector (RCC),让编辑者能够在 CloudCannon 的 Visual Editor 中进行内联翻译。
When to use
何时使用
- A single-language site needs to become translatable — the main workflow, setup.md
- The site already has an i18n system (astro-i18n, next-intl, dictionaries + ) that should be replaced with Rosey — migrating-from-i18n.md
t() - The site runs RCC v1 and should move to v2 — rcc-v1-to-v2-upgrade.md
- A Rosey-ready site needs the CloudCannon inline-translation layer added — setup.md § Phase 5
- 单语言站点需要支持翻译——主要工作流:setup.md
- 站点已有 i18n 系统(astro-i18n、next-intl、dictionaries + ),需要替换为 Rosey——migrating-from-i18n.md
t() - 站点正在使用 RCC v1,需要迁移至 v2——rcc-v1-to-v2-upgrade.md
- 已经适配 Rosey 的站点需要添加 CloudCannon 内联翻译层——setup.md § Phase 5
When not to use
何时不要使用
- Filling in translations on a site that is already Rosey-ready — that's
translate-site - General CloudCannon configuration unrelated to locales — that's
cloudcannon-configuration - Setting up editable regions themselves — that's . This skill covers only where
cloudcannon-visual-editingand regions interact.data-rosey
- 为已经适配 Rosey 的站点填写翻译内容——应使用
translate-site - 与 locale 无关的 CloudCannon 常规配置——应使用
cloudcannon-configuration - 设置 editable regions 本身——应使用 。本 skill 仅涵盖
cloudcannon-visual-editing与 regions 的交互。data-rosey
Contents
目录
| File | Covers |
|---|---|
| SKILL.md (this file) | When this skill applies, the two layers, starting point, SSG detection |
| setup.md | The main workflow — nine phases, audit through locale picker, checklist |
| tagging.md | Phase 3 in full — every |
| gotchas.md | Preventative one-line rules, framework-agnostic and SSG-specific |
| troubleshooting.md | Symptom → cause → fix for things that build cleanly and translate wrongly |
| migrating-from-i18n.md | Replacing an existing i18n system, before the main workflow |
| rcc-v1-to-v2-upgrade.md | Moving a site from RCC v1 to v2 — an alternative to the main workflow |
| astro/overview.md | Astro implementations, plus the Astro i18n migration supplement |
| hugo/overview.md | Hugo: choosing one of three setups, root derivation, setup C (Rosey only) |
| hugo/native-multilingual.md | Hugo setup A: Hugo languages and |
| hugo/hybrid.md | Hugo setup B: Hugo languages for content, Rosey for UI strings |
| eleventy/overview.md | Eleventy implementations, incl. taxonomy scoping and link localization |
| scripts/fix-rosey-pages.mjs | Postbuild fix for canonical and |
| 文件 | 涵盖内容 |
|---|---|
| SKILL.md(当前文件) | 本 skill 的适用场景、两层架构、起点、SSG detection |
| setup.md | 主要工作流——九个阶段,涵盖从审计到 locale picker 以及 checklist |
| tagging.md | 完整 Phase 3——所有 |
| gotchas.md | 通用及特定 SSG 的预防性单行规则 |
| troubleshooting.md | 针对构建成功但翻译结果异常的问题:症状 → 原因 → 修复方案 |
| migrating-from-i18n.md | 在主工作流之前替换现有 i18n 系统 |
| rcc-v1-to-v2-upgrade.md | 将站点从 RCC v1 迁移至 v2——主工作流的替代方案 |
| astro/overview.md | Astro 实现,以及 Astro i18n 迁移补充说明 |
| hugo/overview.md | Hugo:三种配置方案的选择、root derivation、仅使用 Rosey 的配置 C |
| hugo/native-multilingual.md | Hugo 配置 A:Hugo languages 和 |
| hugo/hybrid.md | Hugo 配置 B:内容使用 Hugo languages,UI 字符串使用 Rosey |
| eleventy/overview.md | Eleventy 实现,包括 taxonomy 范围限定和链接本地化 |
| scripts/fix-rosey-pages.mjs | 修复 Rosey 生成页面的 canonical 和 |
The two layers
两层架构
Keep these separate in your head. They are installed together but do different jobs, and only the first is required.
-
Rosey-ready (required). Rosey is an open-source, framework-agnostic tool that operates on your built HTML. You tag translatable elements with, and a postbuild pipeline generates a key/value file per locale (
data-rosey) and builds translated copies of the site atrosey/locales/{code}.jsonURLs. This works on any SSG with no CMS. Once a site is Rosey-ready, translations can be filled in by AI (see the/{locale}/skill), by hand, or by any external service.translate-site -
The RCC visual-editing layer (optional). The RCC is a client-side script that bridges those locale files to CloudCannon's Visual Editor, giving editors a floating locale switcher and inline ProseMirror editors on everyelement, with stale-translation detection. It requires CloudCannon as the CMS. If the site isn't on CloudCannon, skip every RCC/CloudCannon step and translate the locale files another way.
data-rosey
The bulk of this skill (tagging, the pipeline, locale files) is the required Rosey layer. Steps that belong only to the optional RCC layer are marked (RCC layer).
请在概念上将二者分开。它们会一起安装,但职责不同,且只有第一层是必需的。
-
Rosey-ready(必需)。 Rosey 是一款开源、与框架无关的工具,直接作用于构建后的 HTML。你使用标记可翻译元素,postbuild pipeline 会为每个 locale 生成一个 key/value 文件(
data-rosey),并在rosey/locales/{code}.jsonURL 下构建站点的翻译副本。它适用于任何 SSG,无需 CMS。站点适配 Rosey 后,可以通过 AI(参见/{locale}/skill)、手动方式或任意外部服务填写翻译。translate-site -
RCC 可视化编辑层(可选)。 RCC 是一个客户端脚本,将这些 locale 文件桥接到 CloudCannon 的 Visual Editor,为编辑者提供浮动式 locale switcher,并在每个元素上提供内联 ProseMirror 编辑器,同时支持过期翻译检测。它要求以 CloudCannon 作为 CMS。如果站点未部署在 CloudCannon 上,请跳过所有 RCC/CloudCannon 步骤,改用其他方式翻译 locale 文件。
data-rosey
此 skill 的大部分内容(标记、pipeline、locale 文件)属于必需的 Rosey 层。仅属于可选 RCC 层的步骤会标记为 (RCC layer)。
Which starting point are you in?
当前处于哪个起点?
| Situation | Where to go |
|---|---|
| Single-language site, no translation system yet | Start at setup.md — the main workflow |
Site already uses an i18n system (astro-i18n, next-intl, path-based routing, dictionaries + | Do migrating-from-i18n.md first, then setup.md |
Site already uses RCC v1 (form-based YAML editing, | Follow rcc-v1-to-v2-upgrade.md instead — a distinct, self-contained path |
| 情况 | 应从哪里开始 |
|---|---|
| 单语言站点,尚无翻译系统 | 从 setup.md 开始——主要工作流 |
站点已使用 i18n 系统(astro-i18n、next-intl、基于路径的路由、dictionaries + | 先执行 migrating-from-i18n.md,再执行 setup.md |
站点已使用 RCC v1(基于表单的 YAML 编辑、 | 改用 rcc-v1-to-v2-upgrade.md——这是一条独立且自包含的路径 |
SSG detection and framework-specific guidance
SSG detection 与框架专属指南
After auditing the site (Phase 1), identify the SSG and read the matching for framework-specific implementation details:
<ssg>/overview.md| SSG | File to read |
|---|---|
| Astro | astro/overview.md |
| Hugo | hugo/overview.md |
| Eleventy (11ty) | eleventy/overview.md |
Hugo: read before Phase 2. It asks which of three setups the site needs, and one of them (Hugo's own multilingual system) replaces the Rosey workflow entirely.
hugo/overview.mdThese files contain root derivation patterns, content-block namespacing examples, the array-item component rule, split-by-directory details, locale picker examples, and framework-specific gotchas. The phase docs reference them where needed.
完成站点审计(Phase 1)后,识别 SSG,并阅读对应的 ,了解框架专属的实现细节:
<ssg>/overview.md| SSG | 需要阅读的文件 |
|---|---|
| Astro | astro/overview.md |
| Hugo | hugo/overview.md |
| Eleventy (11ty) | eleventy/overview.md |
Hugo:Phase 2 前阅读 。 该文件要求判断站点需要三种配置中的哪一种,其中一种(Hugo 自带的多语言系统)会完全取代 Rosey 工作流。
hugo/overview.md这些文件包含 root derivation 模式、content-block 命名空间示例、数组项组件规则、按目录拆分细节、locale picker 示例,以及框架专属的 gotchas。Phase 文档会在需要时引用它们。