> 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-agent/translations.md).

# 翻译

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

自动翻译让您能够以最少的手动工作，轻松保持多语言文档的最新状态。您可以将一个分区创建为另一个分区的翻译，其余工作交由 GitBook Agent 处理。

<figure><img src="/files/c3503330ccd83e1d9db01b58aa520a630f90e87d" alt=""><figcaption></figcaption></figure>

## 翻译的工作方式

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

{% hint style="info" %}
自动翻译分区中的页面 slug 可能会更改，除非该页面具有固定 slug。要使 URL 在不同语言间保持稳定，请在翻译前设置固定 slug。要更新 slug，请参阅 [如何更改 URL 中的 slug？](/docs/help-center/published-documentation/custom-domains/how-can-i-change-the-slug-in-the-url.md)
{% endhint %}

## 设置自动翻译

要将分区翻译为新语言，请返回组织的 **主页** 并点击 **翻译** ，然后点击侧边栏中的 **创建翻译**.

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

* **源内容** — 您想要翻译的分区
* **源** 语言
* **目标** 语言

点击 **创建** 以启动翻译工作流。这些选项将用于把您的分区翻译为组织中一个复制出的翻译分区。

该 **翻译** 页面还会列出您已配置的翻译工作流，包括其状态、源内容、运行情况以及已翻译的页面和字词。每当源内容更新时，工作流都会重新运行。

### 高级配置

点击 **显示高级说明** 在 **创建翻译** 对话框中配置这些选项。

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

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

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

**词汇表支持：** 定义词汇表以控制特定术语的翻译方式。这可使所有支持的语言中的术语保持一致。

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

## 向变体添加翻译

创建翻译后，您可以将其作为 [变体](/docs/documentation/zh/docs-site/site-structure/variants.md)添加到已发布的文档站点。这将允许用户在查看您的主文档站点时，通过右上角在不同语言之间切换。

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

设置变体时，最佳做法是添加翻译分区所使用的语言。
{% endhint %}

要为翻译设置新变体，请从以下位置打开结构编辑器： **站点结构**，位于 **常规** ，位于站点侧边栏中。

## 定价

翻译是一项付费 **每月** 附加服务：

* 最多 50,000 个翻译字词，费用为 25 美元
* 每增加 1,000 个字词，收费 0.20 美元

每月 25 美元包含 50,000 个翻译字词。此后，每增加 1,000 个字词收费 0.20 美元。您的 50,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/docs-site/customization/extra-configuration.md#localize-user-interface) ，适用于 [特定变体](/docs/documentation/zh/docs-site/customization.md#customizing-sites-with-multiple-sections-or-variants).
  * 这包括用户输入的自定义内容，例如公告横幅。
* 翻译无法向页面添加额外内容，例如提示或标明页面由 AI 翻译的横幅。您可以考虑在翻译分区中添加额外页面来说明此事，或者使用 [公告横幅](/docs/documentation/zh/docs-site/customization/layout-and-structure.md#announcement-premium-and-ultimate) ，位于您的站点变体中。
* 更改词汇表会触发所有页面的完整重新翻译，这可能会增加处理时间和成本。目前不支持基于词汇表使用情况进行部分重新翻译。

</details>

如果您需要入门帮助，或想了解有关配置自动翻译的更多信息， [请联系我们的支持团队](https://gitbook.com/docs/help-center/further-help/how-do-i-contact-support).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
