语言翻译器
本模组允许你通过游戏内菜单创建和编辑语言。
使用方法
要打开语言列表菜单,请点击语言编辑器快捷键(默认:N)。
创建语言
要创建语言,请打开语言编辑器菜单,然后点击“创建新语言”按钮。
系统会提示你输入语言的代码、名称、地区和描述,并询问是否为覆盖语言。
- 代码 - 语言的标识符,格式如
en_us - 名称 - 语言的名称,例如
English - 地区 - 语言的地区,例如
United States - 描述(可选)- 语言的描述(导出为资源包时显示),例如:
Language for English (United States)
覆盖语言选项:
- 设置为“创建新语言”时,当启用的资源包被激活后,会在选项屏幕中创建一种新语言。
- 设置为“覆盖现有语言”(默认)时,将修改现有语言,因此启用资源包后,无需切换其他语言即可看到更改内容。
填写完所有信息后,点击“创建”按钮。
编辑语言
要编辑语言,请点击已创建且需要编辑的语言旁边的编辑按钮。
搜索翻译
要搜索翻译键或值,请在搜索框中输入要查找的字符串。
添加翻译
要添加翻译,请输入翻译键和值,然后点击“添加翻译”按钮。要删除翻译,请点击键左侧的 X 按钮;当该键已添加翻译时,此按钮才会启用。
提示:你可以点击结果列表中的翻译项,以自动填充添加翻译所需的输入框。
查看选择器
选择器允许你筛选想要查看的翻译类别或来源模组,例如:全部、已完成、未完成、捕获、Minecraft 或其他特定于模组/资源包的翻译。
要更改选择器,请点击语言编辑菜单左下角的按钮。
“捕获”选择器
此选择器显示在按下“捕获翻译键”快捷键(默认:K)后(用于下一帧)使用过的所有翻译键。
例如,在主菜单界面按下该快捷键后,“捕获”选择器中将包含 menu.options 翻译键;随后在其他位置再次按下该快捷键时,列表将被替换为下一帧中发现的新翻译键列表。
覆盖模式
覆盖模式会用你希望为其启用覆盖功能的目标语言中的翻译,来修改游戏加载的所有翻译。要启用覆盖功能,请点击语言编辑菜单右下角的按钮。相比资源包,覆盖模式的优势在于可以自动重载,并且无需重新加载所有资源包即可查看更改效果。
你可以直接编辑本模组使用的语言文件来实现覆盖模式的自动重载。这些文件位于游戏目录下的 languages-eplt 文件夹中,文件名格式为 id.json。使用文本编辑器打开它,并在 translations JSON 值中添加翻译条目。仅在明确了解操作后果的情况下使用自动重载功能。
查看翻译键
你可以通过按键盘上的 M 键(默认快捷键)来查看游戏所使用的翻译键。
默认情况下,游戏会对所有翻译键进行翻译,但此选项允许你查看原始翻译键。该快捷键提供以下选项:
- 查看已翻译文本(默认)
- 查看翻译键及参数(使用原文颜色)
- 查看翻译键及参数(使用调色板),调色板定义如下:
- 青色 - 代码中标记为 Text/Component 的字面字符串
- 红色 - 未指定翻译的翻译键
- 绿色 - 有对应翻译的翻译键(此功能需要覆盖特性支持,仅当覆盖语言中设置了该键时才会显示绿色)
- 粉色 - 代码中标记为 String 的字面字符串
- 灰色 - 其他符号,如
[](翻译的参数)、<>(文本组件的子节点)以及,
游戏应更新所有使用翻译的文本区域,因此多次按下该快捷键后,你将能够直观地看到各选项之间的差异。
导出语言
要导出语言,请点击语言编辑器菜单中的导出按钮。系统将提示你输入资源包名称。点击“导出”按钮后,生成的资源包将出现在你的资源包文件夹中,名称为你指定的名称。
启用语言
要启用你导出的语言,首先需启用对应的资源包,然后在原版语言列表中启用该语言。
其他信息
你可以在整合包中使用本模组。
Language Translator
This mod lets you create and edit languages in game with an in-game menu.
Usage
To open the language list menu click the Language Editor keybind (default: N)
Creating languages
To create a language open the language editor menu, and click the "Create new language" button.
This will prompt you for the Code, Name, Region, and Description of the language, and whether it's an overlay language.
Code - The identifier for the language, using a format like en_us
Name - The name of the language, for example English
Region - The region of the language, for example United States
Description (optional) - The description of the language (shown when exported to a resource pack), for example: Language for English (United States)
The overlay language option:
- when set to "Create a new language", will create a new language in the options screen when the exported resource pack is enabled.
- when set to "Overlay a language" (default), will modify an existing language, so when the resource pack is enabled, you won't have to enable a different language to see the changes.
After you fill all of them out, click the Create button.
Editing languages
To edit languages, click the edit button for the language you created and want to edit.
Searching translations
To search for translation keys or values, type the strings you want to search for in the search boxes.
Adding translations
To add translations type the translation key and value and then click the add translation button. To remove translations click the X button on the left of keys, the button is enabled when there is a translation added to the key.
Tip: You can click the translations in the result list to automatically fill in the boxes for adding translations.
Viewing selectors
Selectors let you filter what category or mod of the translations you would want to see, for example: All, Finished, Unfinished, Captured, Minecraft, or any other mod/resource pack specific translations.
To change the selector click the button in the bottom left of the language editing menu.
"Captured" Selector
This selector shows all translation keys which were used (for the next frame) after pressing the "Capture translation keys" keybind (default: K).
For example when pressed on the main menu screen, the "Captured" selector will have the menu.options translation key, then when the keybind is pressed in some other place, it will replace the list with the new list of translation keys found in the next frame.
Overlay
An overlay will modify all the translations loaded by the game by the translations in the specific language you would want to enable the overlay for, to enable the overlay click the button in the bottom right of the language editing menu. Overlays have an advantage over resource packs that you can auto-reload them, and you don't have to reload all of the resource packs to see the changes.
You can use auto-reload with overlays by directly editing the language files used by this mod, in the game folder in the languages-eplt folder, the file would be named id.json, open it with a text editor and add translation entries to the translations json value. Use auto-reload if you know what you're doing
Viewing translation keys
You can view translation keys that the game uses by clicking M on your keyboard (default keybind).
By default, the game translates all translation keys, but this option allows you to view the translation keys, the options for this keybind are:
- View translated text (default)
- View translation keys and arguments (using colors from the original text)
- View translation keys and arguments (using a color palette), the color palette is as follows:
- aqua - A literal string marked as a Text/Component in code
- red - A translation key without a specified translation
- green - A translation key with a translation (this requires the overlay feature, green will only appear when the overlay language has this key set)
- pink - A literal string marked as a String in code
- gray - other symbols like
[](arguments for translations),<>(siblings of a text component), and,
The game should update all text where translations are used, so you will be able to see the difference in what each option does, after clicking the keybind a couple times.
Exporting languages
To export languages click the export button in the language editor menu, this will prompt you for the resource pack name, after you click the Export button you will have a resource pack with the specified name in your resource pack folder.
Enabling languages
To enable a language you exported, first enable the resource pack, and then enable the language in the vanilla language list.
Other Info
You can use this mod in modpacks.
下载 Language Translator
下载 Language Translator
下载 Language Translator
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Language Translator
下载 Language Translator
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Language Translator
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Language Translator
下载 Language Translator
下载 Language Translator
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Language Translator
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧