> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/gitbook-dai-li/translations.md).

# 翻译

使用 GitBook Agent 将你的内容自动翻译成多种语言，并保持同步更新

{% hint style="info" %}
只有 [组织管理员](https://gitbook.com/docs/documentation/zh/collaborate/member-management/roles.md#admin) 才能创建和访问翻译，因为这是一项 [需要付费的功能](#pricing).
{% endhint %}

自动翻译可以让你以最少的手动工作，轻松地让文档保持多语言同步更新。你可以创建某个章节作为另一章节的翻译，其余部分交给 GitBook Agent 处理。

<figure><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-3777238cc7776f4b7fc0f67870454e27b06d7578%2F25_12_10_create_translation%402x.png?alt=media" alt=""><figcaption></figcaption></figure>

## 翻译如何运作

* **创建翻译分区：** 将新分区设置为现有分区的翻译。选择源分区和目标语言。
* **持续更新：** 每次更改源内容时，翻译工作流只会针对 **已更改的页面**.
* **自动同步：** 更改合并后，翻译工作流 **会自动运行** 并与源内容同步，因此翻译后的章节始终反映最新更新。

{% hint style="info" %}
自动翻译章节中的页面 slug 可能会发生变化，除非页面设置了固定 slug。若要确保不同语言版本的 URL 保持稳定，请在翻译前设置固定 slug。有关如何更新 slug，请参阅 [如何更改 URL 中的 slug？](https://app.gitbook.com/s/Ua3kTfM3iWAoECzM0u90/published-documentation/custom-domains/how-can-i-change-the-slug-in-the-url)
{% endhint %}

## 设置自动翻译

若要将某个章节翻译成新语言，请返回组织的 **主页** 并点击侧边栏中的 **翻译** ，然后点击 **创建翻译**.

在 **创建翻译** 对话框中，选择：

* **源语言** — 您要翻译的部分。
* **从** 语言。
* **翻译为** 语言。

点击 **创建** 以启动翻译工作流。这些选项将用于将你的内容分区翻译为组织中的一个重复版本。

“ **翻译** ”页面还会列出你配置的翻译工作流，包括其状态、源语言、运行记录以及已翻译的页面和字数。每当源内容更新时，工作流都会重新运行。

### 高级配置

点击 **显示高级说明** （位于 **创建翻译** 用于配置这些选项的模态框。

**自定义 AI 指令：** 添加高级指令，引导 AI 调整语气、风格或其他偏好。这有助于确保译文符合您的品牌或受众需求。

{% hint style="info" %}
为您的翻译工作流添加自定义指令可能很有帮助，但在某些情况下会受到限制。

自定义指令不能用于在翻译章节中创建新元素、添加额外文本或更改源内容的结构。
{% endhint %}

**术语表支持：** 定义术语表，以控制特定术语的翻译方式。这有助于确保所有受支持的语言都使用一致的术语。

您的术语表术语必须与您想控制的源语言措辞匹配。GitBook 会在翻译运行期间应用它们，以保持术语一致。

例如，如果源语言是英语，且术语表中包含 `SSO` → `SSO` 和 `Git Sync` → `Git Sync`，例如，“使用 Git Sync 设置 SSO”这样的句子在译文中会保留这些术语不变。

{% hint style="warning" %}
**更改术语表会触发对内容的完整重新翻译**。目前没有变通办法：我们无法可靠地检测哪些页面可能包含术语表中的关键词，因此最稳妥的做法是重新翻译所有页面。因此，更新术语表可能需要耗费大量时间和成本。
{% endhint %}

## 将翻译添加到变体

创建翻译后，您可以将其作为 [变体](https://gitbook.com/docs/documentation/zh/manage-your-site/site-structure/variants.md)添加到已发布的文档站点。这样，用户在浏览主文档站点时，就可以在右上角切换语言。

{% hint style="info" %}
为了给用户提供最佳体验，您可以在设置中配置变体时设置其默认语言。

在设置变体时添加翻译章节的语言是最佳实践。
{% endhint %}

要为翻译设置新的变体，请从站点侧边栏中打开结构编辑器 **站点结构** 。

## 定价

翻译是付费附加功能。我们按与您的主订阅相同的月度或年度周期计费。

* 月费：每月 25 美元，可翻译最多 50,000 个单词。
* 年费：每年 250 美元，可翻译最多 50,000 个单词。
* 每增加 1,000 个单词收取 0.20 美元。

每月额度在每月初重置。0.20 美元费率适用于每额外 1,000 个字，包括年度订阅。

“每月”描述的是费率和字数额度，并不描述计费周期。

首次翻译时，每个词都会计入费用。之后，只有包含新增或更新词语的 **页面** 才会计费。例如，如果你之后编辑文档，只有包含新增词语的页面会计入字数限额——整个文档不会再次计费。

{% hint style="warning" %}
在处理多个带有大页面的翻译时请谨慎，因为翻译字数统计包括包含变更的页面中的所有词——这意味着如果大页面中只有少数字被更改，整页都会重新翻译。
{% endhint %}

## 常见问题

<details>

<summary>为什么使用自动翻译？</summary>

* **轻松创建多语言文档：** 无需手动翻译，即可触达全球受众。
* **智能更新：** 仅重新翻译有变更的页面，节省时间和资源。
* **完全掌控：** 通过高级指令和术语表管理自定义翻译。

</details>

<details>

<summary>我可以编辑翻译吗？</summary>

你无法编辑译文。

由于翻译是对源内容的纯转换，我们无法将翻译结果上的潜在编辑与新的翻译进行协调。

为了解决这一点，我们建议采用以下流程：

* 使用术语表定义您希望 AI 使用的特定翻译
* 使用自定义指令来迭代输出结果

</details>

<details>

<summary>我需要创建多少个翻译？</summary>

对于任何给定的源内容，每种语言只能创建 **一个翻译工作流** 。创建多个工作流会为你的组织带来额外的重复费用。

</details>

<details>

<summary>目前有哪些限制？</summary>

* 翻译不会自动本地化变体中的界面元素。请在站点侧边栏中打开 **自定义** ，以便 [本地化界面](https://gitbook.com/docs/documentation/zh/manage-your-site/customization/extra-configuration.md#localize-user-interface) ，适用于 [特定变体](https://gitbook.com/docs/documentation/zh/manage-your-site/customization.md#customizing-sites-with-multiple-sections-or-variants).
  * 这包括用户输入的自定义内容，例如公告横幅。
* 翻译内容无法在页面中添加额外内容，例如提示或说明页面由 AI 翻译的横幅。您可以考虑在翻译后的部分中添加一个页面来说明此事，或使用站点变体中的 [公告横幅](https://gitbook.com/docs/documentation/zh/manage-your-site/customization/layout-and-structure.md#announcement-premium-and-ultimate) 。
* 更改术语表会触发所有页面的全面重新翻译，这可能会增加处理时间和成本。目前无法根据术语表使用情况进行部分重新翻译。

</details>

如果你需要入门帮助，或想进一步了解如何配置自动翻译， [请联系我们的支持团队](broken://pages/04cf2dcac6d338e981b70bca3ec8785a595da022).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/zh/gitbook-dai-li/translations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
