聊天翻译模组
一个通过单次点击将 Minecraft 聊天消息翻译成指定语言的模组。翻译功能通过 Google Apps Script (GAS) API 实现。适用于 Fabric 环境,Minecraft 版本 1.21.11 或 26.2。
如果觉得配置过程太麻烦,你可以直接复制以下链接并粘贴到 API URL(config/translator-url.txt)中:
使用方法
你必须完成以下步骤才能启用翻译功能。
步骤 1. 登录你的 Google 账号并访问
步骤 2. 创建一个新项目。你可以随意命名,例如 "Minecraft Translation API"。
步骤 3. 选择并删除所有默认代码,然后粘贴以下代码:
function doGet(e) {
var {text, target = 'ja', source = ''} = e.parameter;
var translatedText = LanguageApp.translate(text, source, target);
return ContentService.createTextOutput(translatedText).setMimeType(ContentService.MimeType.TEXT);
}
步骤 4. 点击“部署”按钮并选择“新部署”。将类型设置为“Web 应用”。你可以输入任意描述。将“执行身份”设置为“我”,将“谁可以访问”设置为“任何人”,然后点击“部署”按钮。
步骤 5. 复制生成的 Web 应用 URL(看起来像 )以完成此步骤。不要将此 URL 分享给任何人! **步骤 6.** 将下载的 .jar文件放入你的mods文件夹中。 **步骤 7.** 启动一次 Minecraft 并关闭它。这将在你的config文件夹中生成配置文件。 **步骤 8.** 打开translator-url.txt,粘贴你在上一步准备的翻译 API URL(如 GAS 等),并保存文件。 **步骤 9.** 打开 translator-lang.txt以更改目标语言代码(例如en 代表英语,ja` 代表日语)。默认语言为日语 (ja)。
- 如果你有任何问题、功能请求或遇到问题,请在 Discord 上私信我。
- Discord 用户名: @nuyuchi
Chat Translation Mod
A mod that translates Minecraft chat messages into your specified language with a single click. The translation is done via the Google Apps Script (GAS) API. It works on the Fabric environment, Minecraft Version 1.21.11 or 26.2.
If setting it up is too much trouble, you can just copy the following link and paste to API URL (config/translator-url.txt):
How to Use
You must complete these steps to enable translations.
Step 1. Log in to your Google account and go to
Step 2. Create a new project. You can name it anything you like, such as "Minecraft Translation API".
Step 3. Select and delete all the default code, then paste the following code:
function doGet(e) {
var {text, target = 'ja', source = ''} = e.parameter;
var translatedText = LanguageApp.translate(text, source, target);
return ContentService.createTextOutput(translatedText).setMimeType(ContentService.MimeType.TEXT);
}
Step 4. Click the "Deploy" button and choose "New deployment". Set the type to "Web app". You can enter any description. Set "Execute as" to "Me" and "Who has access" to "Anyone", then click the "Deploy" button.
Step 5. Copy the generated Web App URL (which looks like ) to complete this step. Do not share this URL with anyone! **Step 6.** Place the downloaded .jarfile into yourmodsfolder. **Step 7.** Launch Minecraft once and close it. This will generate the configuration files in yourconfigfolder. **Step 8.** Opentranslator-url.txt, paste the translation API URL (GAS, etc.) you prepared in the previous step, and save the file. **Step 9.** Open translator-lang.txtto change the target language code (e.g.,enfor English,ja` for Japanese). Default language is Japanese(ja).
- If you have any questions, feature requests, or encounter issues, please send me a DM on Discord.
- Discord Username: @nuyuchi
评论 0
登录后参与评分
还没有评论,来抢沙发吧