BabelCraft
版本 1.2.5.3 · Minecraft 1.20.1 · Forge 47+ · 仅客户端 · 许可证:MIT
BabelCraft(原名 Mod Translator)能够实时自动翻译其他模组绘制在屏幕上的所有文本——包括界面、按钮、界面标题、物品提示、按钮提示、指南书(Patchouli / Lexica Botania),甚至 HUD 覆盖层——且绝不翻译 Minecraft 本体。你可以决定允许哪些模组被翻译,也可以一次性启用对所有模组的翻译。
工作原理
翻译使用免费的 Google Translate 端点(无需 API 密钥)。
每个翻译后的字符串都会缓存到磁盘,因此每段文本只会被翻译一次——即使跨游戏会话也是如此。只有当某段特定文本首次出现时才需要联网。
待处理的行会分批发送(每次请求最多 20 行 / 1600 个字符,并设有 150 毫秒的窗口期以合并来自同一页面的行),因此完整翻译一页指南书仅需 1–2 次请求,而非逐行请求。屏幕文本始终优先于后台预翻译流量(见下文),因此大型整合包的预热过程绝不会延迟你当前正在查看的内容。
在主菜单时,BabelCraft 会在后台静默预翻译每个已允许模组的语言文件,这样当你进入新世界时(例如选择出生地界面、任务书等),这些界面很可能已经被翻译好了。
Patchouli 书籍是逐字绘制文本的;该模组会将单词重新组合成完整的行(并可选地组合成整个段落——参见下方的“换行长文本”),然后再进行翻译,因此结果读起来像正常的句子,而不是逐字翻译。原始行会在翻译到达前显示,且不会出现闪烁。
由于译文(例如葡萄牙语)通常比英文长,每行译文都会被适配到原始空间的大小:溢出约 8% 以内的内容保持不变,轻微溢出的会压缩宽度(难以察觉),而较大溢出的则会按比例缩小字体以保持可读性(最小为 0.4 倍)。
玩家输入的文本(如搜索框等)永远不会被翻译。聊天也不会被翻译(因为它是玩家对话和命令反馈,包括该模组自身的反馈)。
如果翻译服务失败或限流(无网络、端点过载),将显示原文,并且模组会以递增退避时间重试(最长 2 分钟),而不是疯狂请求端点。
安装
将 babelcraft-1.2.5.3.jar 复制到你 Forge 1.20.1 实例的 mods 文件夹中。
正常启动游戏。
入门指南
默认情况下,“翻译所有模组”处于开启状态——无需逐个允许即可翻译所有模组。如果你偏好对每个模组单独控制,请在“模组”选项卡中关闭该选项,并在其中勾选你想要的模组(首次关闭此选项时,会继续翻译所有已加载的模组,直到你取消勾选特定模组,因此不会突然停止翻译)。
配置界面(选项卡式)
通过在游戏中聊天输入 /babelcraft gui、在“选项 → 控制”中绑定“打开 BabelCraft 设置”按键,或在原版“选项”界面的“语言...”旁边点击小型方形“T”按钮来打开它。它包含四个选项卡:
常规 — 启用/禁用翻译;翻译放大镜(见下文);显示原文(提示框中会显示原文,译文以灰色显示在其下方);翻译 HUD;物品提示;换行长文本(将整个多行段落作为整体进行翻译并重新换行,仅限完整单词——默认关闭,对于布局在不同帧之间变化的模组来说更稳定);清除翻译缓存(强制重新翻译所有内容,如果某些内容卡住显示了错误或缺失的翻译,这会很有用)。
模组 — 列出所有已加载的模组,每个模组旁有 [x]/[ ] 复选框,一个搜索字段(随输入按名称或 modid 进行过滤),“全部启用 / 全部禁用”按钮以及分页导航。在有活跃搜索的情况下,“全部”按钮仅作用于过滤后的模组。“翻译所有模组”复选框现在位于此处。
语言 — 可供点击选择的可用语言列表(Português, English, Español, 日本語…),以及一个用于输入自定义语言代码的字段。
进度条(新增)— 选择三种显示翻译进度的方式之一:面板(原始的带有模组名称 + 预计剩余时间的小型文本框)、Boss 栏(样式完全类似 Boss 血条的宽条,随着进度填充)或旋转图标(仅显示百分比的小型旋转圆圈)。还可配置大小、不透明度和位置。
翻译放大镜
在“常规”→“翻译放大镜”中启用它(或使用 /babelcraft iconmode)。一个小“T”图标会出现在任何界面上,并与全局翻译配合使用,就像放大镜一样:
用鼠标拖拽图标并将其放置在某段文本上。
一个浮动面板会在图标旁边打开,一次性翻译整个段落(模组会自动连接该块的所有相邻行)——非常适合舒适地阅读经过就地翻译后变得过小的行。
即使是对允许列表之外的模组中的文本也有效(界面本身不会被修改,但放大镜会在面板中显示译文)。
在翻译仍在加载时,面板会显示“翻译中...”。
图标的位置会在会话之间保存。
随时查看原文
按住左 Alt(可在“控制”中配置:“按住以查看原文”),在按住按键期间所有已翻译的文本会恢复为原文。松开按键则返回译文。结合“显示原文”的提示选项,你就可以同时查看两种语言了。
命令
命令 效果
/babelcraft gui 打开配置界面
/babelcraft toggle 开启/关闭所有功能
/babelcraft language 设置目标语言(例如 pt、en、es)
/babelcraft allow <modid> 允许翻译该模组
/babelcraft disallow <modid> 移除该模组的权限
/babelcraft allowall 允许所有已加载的模组
/babelcraft disallowall 清除所有单独设置的权限
/babelcraft allmods 切换“翻译所有模组”选项
/babelcraft iconmode 切换翻译放大镜
/babelcraft itemtooltips 切换物品描述翻译
/babelcraft wrap 切换整段换行
/babelcraft clearcache 清除当前语言的翻译缓存
/babelcraft list 列出已加载模组及其开启/关闭状态
/babelcraft showoriginal 切换在悬浮提示中同时显示原文和译文
/babelcraft hud 切换 HUD 覆盖层翻译
Botania 书籍(Lexica Botania)
在“翻译所有模组”处于开启状态时(默认),该书籍已被翻译。如果你关闭了此选项,请记住该书籍由 Patchouli 模组渲染,因此需要同时允许以下两个模组:
/babelcraft allow patchouli
/babelcraft allow botania
patchouli 负责翻译书籍页面;botania 负责翻译物品名称和悬浮提示。
文件
设置:config/babelcraft.json
缓存:config/babelcraft/cache_<language>.json(删除它或使用“清除翻译缓存”以强制重新翻译)
兼容性
Minecraft 1.20.1
Forge 47+
仅客户端——服务器端无需安装。
BabelCraft
Version 1.2.5.3 · Minecraft 1.20.1 · Forge 47+ · Client-side only · License: MIT
BabelCraft (formerly Mod Translator) automatically translates, in real time, all on-screen text drawn by other mods — screens, buttons, screen titles, item tooltips, button tooltips, guidebooks (Patchouli / Lexica Botania), and even HUD overlays — without ever translating Minecraft itself. You decide which mods are allowed to be translated, or enable translation for all mods at once.
How it works
Translation uses the free Google Translate endpoint (no API key required).
Every translated string is cached to disk, so each piece of text is translated only once — even across game sessions. Internet is only needed the first time a given text appears.
Pending lines are sent in batches (up to 20 lines / 1600 characters per request, with a 150 ms window to group lines from the same page), so a full guidebook page costs 1–2 requests instead of one per line. On-screen text always jumps ahead of background pre-translation traffic (see below), so a big modpack's warm-up never delays what you're actually looking at.
At the title screen, BabelCraft quietly pre-translates every allowed mod's own language file in the background, so screens that appear early in a new world (origin-selection screens, quest books, etc.) are more likely to already be translated by the time you reach them.
Patchouli books draw text word-by-word; the mod regroups the words into full lines (and, optionally, whole paragraphs — see "Wrap long text" below) before translating, so the result reads like a proper sentence instead of word-for-word. The original line shows until the translation arrives, without flicker.
Because translations (e.g. Portuguese) are often longer than English, each translated line is fit to the original space: overflow up to ~8% passes unchanged, small overflows condense the width (imperceptible), and larger ones proportionally shrink the font to stay readable (minimum 0.4x).
Player-typed text (search boxes, etc.) is never translated. The chat is never translated either (it's player conversation and command feedback, including the mod's own).
If the translation service fails or rate-limits (no internet, endpoint overloaded), the original text is shown and the mod retries with an increasing backoff (up to 2 minutes) instead of hammering the endpoint.
Installation
Copy babelcraft-1.2.5.3.jar into the mods folder of your Forge 1.20.1 instance.
Launch the game normally.
Getting started
By default, "Translate all mods" is ON — every mod is translated without having to allow them one by one. If you prefer per-mod control, turn that option off in the Mods tab and check the mods you want there (turning it off for the first time keeps translating everything already loaded until you uncheck something specific, so nothing suddenly goes silent).
Configuration screen (tabbed)
Open it with /babelcraft gui in chat, bind the "Open BabelCraft settings" key in Options → Controls, or click the small square "T" button next to "Language..." in the vanilla Options screen. It has four tabs:
General — enable/disable translation; translation magnifier (see below); show original (tooltips show the original with the translation in gray below); translate HUD; item tooltips; wrap long text (translates multi-line paragraphs as a whole and rewraps them, whole words only — off by default, steadier for mods whose layout shifts between frames); clear translation cache (forces everything to be re-translated, useful if something got stuck showing the wrong or no translation).
Mods — list of all loaded mods with [x]/[ ] per mod, a search field (filters by name or modid as you type), Enable all / Disable all buttons, and page navigation. With an active search, the "all" buttons act only on the filtered mods. The "Translate all mods" checkbox lives here now.
Languages — list of available languages to click and select (Português, English, Español, 日本語…), plus a field to type a custom language code.
Progress bar (new) — choose between three ways to show translation progress: a panel (the original small text box with mod name + ETA), a boss bar (a wide bar styled exactly like a boss health bar, filling up as it goes), or a spinner (a small rotating circle with just a percentage). Also configurable: size, opacity, and position.
Translation magnifier
Enable it in General → "Translation magnifier" (or /babelcraft iconmode). A small "T" icon appears over any screen and works alongside global translation, like a magnifying glass:
Drag the icon with the mouse and drop it onto a piece of text.
A floating panel opens next to the icon with the entire paragraph translated at once (the mod automatically joins all neighboring lines of the block) — great for comfortably reading lines that came out small after in-place translation.
Works even on text from mods outside the allow list (the screen itself isn't altered, but the magnifier shows the translation in the panel).
While the translation is still loading, the panel shows "Translating…".
The icon's position is saved between sessions.
See the original text anytime
Hold Left Alt (configurable in Controls: "Hold to see original text") and all translated text reverts to the original while the key is held. Release it and the translation returns. Together with the "Show original" tooltip option, that's how you view both languages at once.
Commands
Command Effect
/babelcraft gui Open the configuration screen
/babelcraft toggle Turn everything on/off
/babelcraft language Set the target language (e.g. pt, en, es)
/babelcraft allow <modid> Allow translating that mod
/babelcraft disallow <modid> Remove that mod's permission
/babelcraft allowall Allow all loaded mods
/babelcraft disallowall Clear all individual permissions
/babelcraft allmods Toggle "translate all mods"
/babelcraft iconmode Toggle the translation magnifier
/babelcraft itemtooltips Toggle item description translation
/babelcraft wrap Toggle whole-paragraph wrapping
/babelcraft clearcache Wipe the translation cache for the current language
/babelcraft list List loaded mods with ON/OFF status
/babelcraft showoriginal Toggle original + translation in tooltips
/babelcraft hud Toggle HUD overlay translation
Botania book (Lexica Botania)
With "Translate all mods" ON (default), the book is already translated. If you turned that option off, remember the book is rendered by the Patchouli mod, so allow both:
/babelcraft allow patchouli
/babelcraft allow botania
patchouli translates the book pages; botania translates the item names/tooltips.
Files
Settings: config/babelcraft.json
Cache: config/babelcraft/cache_<language>.json (delete it, or use "Clear translation cache", to force re-translation)
Compatibility
Minecraft 1.20.1
Forge 47+
Client-side only — not required on the server.
评论 0
登录后参与评分
还没有评论,来抢沙发吧