本模组作为游戏内的翻译工具,旨在翻译各种游戏内元素中的文本,且不会更改世界数据。它支持翻译聊天窗口、计分板、Boss 栏、标题、工具提示、告示牌、书籍内容、实体名称等处的文本。
主要特性
- 非侵入式翻译: 确保所有功能均不修改游戏世界数据。
- 多种翻译模式: 支持自动翻译、点击翻译、快捷键翻译等。
- 屏幕 OCR 识别: 可识别屏幕上的文本并进行翻译。
- 快捷键:
- 按 U 打开翻译选项。
- 按 O 启动屏幕识别(OCR)。
游戏内命令
/transconfig config:打开翻译器配置界面,以设置翻译服务、API 密钥及其他选项。也可通过 Mod Menu 访问。
/transconfig language <from> <to>:设置翻译的源语言和目标语言。
/transconfig chatformat <format>:设置聊天翻译的显示格式。
/transconfig clearcache:清除翻译缓存。
/translate <text>:用于翻译提供文本的命令。
/translate-re <text>:反向翻译命令,将目标语言翻译回源语言。
支持的翻译服务
该模组内置了对以下翻译服务的集成:
- OpenAI(支持自定义提示词)
- 百度翻译
- 有道翻译
用户必须从相应平台获取自己的 API 密钥,然后通过 Mod Menu 或 /transconfig config 命令配置翻译器。
自定义 OpenAI 提示词
如果您使用 OpenAI 翻译器,可以编辑 .minecraft/config/translator/prompt.md 文件来自定义翻译提示词,从而调整翻译风格、术语偏好等。修改后运行 /transconfig reload 以应用更改。
注意: 上述说明适用于 3.0.0 及以上版本。对于低于 3.0.0 的版本,请参阅 旧版项目仓库 中的文档。
This mod serves as a translation tool within the game, designed to translate text found in various in-game elements without altering world data. It supports translating text in the chat window, scoreboard, bossbar, title, tooltip, sign, book content, entity names, and more.
Key Features
- Non-Intrusive Translation: Ensures that all functionalities do not modify the game world data.
- Multiple Translation Modes: Supports automatic translation, click-to-translate, hotkey translation, and more.
- Screen OCR Recognition: Can recognize text on screen and translate it.
- Hotkeys:
- Press U to open translation options.
- Press O to initiate screen recognition (OCR).
In-Game Commands
/transconfig config: Open the translator configuration screen to set up translation services, API keys, and other options. Can also be accessed via the Mod Menu.
/transconfig language <from> <to>: Set the source and target languages for translation.
/transconfig chatformat <format>: Set the chat translation display format.
/transconfig clearcache: Clear the translation cache.
/translate <text>: Command to translate provided text.
/translate-re <text>: Reverse translation command, translating from the target language back to the source language.
Supported Translation Services
The mod comes equipped with integration for the following translation services:
- OpenAI (with custom prompt support)
- Baidu Translate
- Youdao Translate
Users must obtain their own API keys from the respective platforms, then configure the translators via the Mod Menu or the /transconfig config command.
Custom OpenAI Prompt
If you use the OpenAI translator, you can edit the .minecraft/config/translator/prompt.md file to customize the translation prompt, allowing you to adjust translation style, terminology preferences, and more. Run /transconfig reload after making changes to apply them.
Note: The above instructions apply to version 3.0.0 and above. For versions below 3.0.0, please refer to the legacy project repository for documentation.
评论 0
登录后参与评分
还没有评论,来抢沙发吧