> 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 的 AI Agent 将你的内容自动翻译成多种语言并保持同步

{% hint style="info" %}
仅 [组织管理员](/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%2FhOOp6fNMYks6U4M6UXTO%2FCreate%20translation%402x.png?alt=media&amp;token=a142a9cd-6ecd-49c4-9670-2226897afc1f" 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 会在翻译运行期间应用它们，以保持术语一致。

例如，如果您的源语言是英语，并且您的术语表包含 `单点登录` → `单点登录` 和 `Git Sync` → `Git Sync`，那么像“Set up SSO with Git Sync”这样的句子在翻译输出中会保持这些术语不变。

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

## 将翻译添加到变体

创建翻译后，您将能够将其作为 [变体](/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>

* 翻译不会自动本地化您变体中的 UI 元素。打开 **自定义** 在站点侧边栏中以 [本地化界面](/docs/documentation/zh/manage-your-site/customization/extra-configuration.md#localize-user-interface) 为 [特定变体](/docs/documentation/zh/manage-your-site/customization.md#customizing-sites-with-multiple-sections-or-variants).
  * 这包括用户输入的自定义内容，例如公告横幅。
* 翻译不能向页面添加额外内容——例如提示或说明页面由 AI 翻译的横幅。可以考虑在翻译章节中添加一个额外页面来说明这一点，或者使用 [公告横幅](/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.
