> For the complete documentation index, see [llms.txt](https://ruang-feng.gitbook.io/deer-s/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ruang-feng.gitbook.io/deer-s/zheng-wen/recommended-mastery-skills/mod-translation.md).

# Mod翻译

### Mod翻译

其实很多时候我们在CureForge下载的国外mod发布时除了英语这种默认语种（一般是en\_US）其他语种根本没有的，你不可能要求一个modder开发一个mod还要精通八国语言。那么为什么我们下载的很多mod都有中文呢？这是因为很多可敬的mod搬运工，他们搬运Mod搬运的时候都会对mod进行汉化处理，并提交到原作者的GitHub储存库。作者如果上心的话一般会在下一个版本把这个提交过来的语言整合进去。这里向所有的modder和mod搬运工致敬。 （一般流程）

但是如果你在整合包里面采用了一些冷门mod，他们没有被相中且被搬运。也就没有多语言，这时候就需要你自己经行汉化mod了。在forge的文档中提到过：

> 国际化, 简称为i18n,是一种可以适用于各种语言的代码设计思路。本地化是指显示适用于用户语言的文字的过程 。I18n用 翻译密钥(translation keys)实现。 翻译密钥是一个字符串，用于标识一段没有特定语言的可显示文本。 例如, 翻译密钥tile.dirt.name指的是泥土方块的名字。 这样，可以引用可显示的文本而不关心特定语言。 加入新语言时，代码不需要修改。本地化将在游戏的本地设置中发生。 在Minecraft客户端中，位置由语言设置指定。 在专用服务器上，唯一受支持的语言环境是en\_US。 可以在 Minecraft Wiki上找到可用语言环境的列表。

其实吧说白了，就是在一个字符串后面添加这个物品你想翻译成的名字，这样在启动对应语言的时候就会出现。

那么说说具体如和操作，mod语言文本一般位于本地mod的assets包下面的一个包的再下面一个包（一般是mod名）的lang包中。打个比方，TC的美国英语语言文本文件就位于`assets\thaumcraft\lang\en_US.lang。` 一般情况下没有汉化的mod中是没有`zh_CN.lang` 文件的，这时候你就需要创建一个，然后把`en_US.lang` 文件里面的东西全部复制进来，然后把对应的英语翻译成中文即可。不过切记不要直接在`en_US.lang`进行翻译，**这是不可取的!**


---

# 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://ruang-feng.gitbook.io/deer-s/zheng-wen/recommended-mastery-skills/mod-translation.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.
