> For the complete documentation index, see [llms.txt](https://gitbook-open-v2-preview.gitbook.workers.dev/url/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-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/documentation/zh/gitbook-agent/translations.md).

# 翻译

{% hint style="info" %}
仅 [组织管理员](/url/gitbook.com/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？](/url/gitbook.com/docs/help-center/published-documentation/custom-domains/how-can-i-change-the-slug-in-the-url.md)
{% endhint %}

## 设置自动翻译

要将空间翻译为新语言，首先创建一个新的 [空间](/url/gitbook.com/docs/documentation/zh/creating-content/content-structure/space.md#create-a-space) 在你的组织中。从弹出的模态窗口中，点击 **翻译** 位于快速操作菜单中。

在弹出的模态窗口中，你需要选择：

* 源
* 源语言
* 目标语言

这些选项将用于把你的空间翻译并复制为你组织中的一个翻译空间。你还会看到翻译该空间费用的快速概览。

### 高级配置

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

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

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

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

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

## 将翻译添加为变体

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

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

在设置变体时，最好添加你翻译空间的语言。
{% endhint %}

前往站点设置，在“结构”选项卡下，为你已有的任何翻译设置一个新的变体。

## 定价

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

* 25 美元，最多可翻译 50,000 个单词
* 每额外 1,000 个单词 0.20 美元

每月包含 50,000 个翻译单词，费用为 25 美元。之后，每增加 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 元素。前往你网站的自定义设置，以 [本地化界面](/url/gitbook.com/docs/documentation/zh/docs-site/customization/extra-configuration.md#localize-user-interface) 用于 [特定变体](/url/gitbook.com/docs/documentation/zh/docs-site/customization.md#customizing-sites-with-multiple-sections).
  * 这包括用户输入的自定义内容，例如公告横幅。
* 翻译不能向页面添加额外内容——例如提示或说明页面已由 AI 翻译的横幅。可以考虑在翻译空间中添加一个额外页面来说明，或者使用你站点变体中的 [公告横幅](/url/gitbook.com/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:

```
GET https://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/documentation/zh/gitbook-agent/translations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
