跳到正文

Chat translator

This mod translates Minecraft chat into multiple languages.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

This mod translates Minecraft chat into multiple languages!

Supported languages:

  • English (english/en)
  • French (french/fr)
  • German (german/de)
  • Russian (russian/ru)
  • Spanish (spanish/es)

Example

Replace this with a description

How select language?

/sw4-translator mylanguage spanish/russian/german/french/english

How does the mod translate messages?

Message Interception – The ChatHud.addMessage() mixin intercepts all incoming chat messages.

Text Extraction – Parses the message, separating the player name from the text:

hello → Player: “Player”, text: “hello”

HTTP Request to Google Translate – Sends an asynchronous GET request:

https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=ru&dt=t&q=hello

sl=auto – autodetect source language

tl=ru – disable language (your selected one)

q=hello – text to translate

JSON Response Parsing – Extracts the translated text from Google’s JSON response
Add to Chat – Adds a new message with the translation:

Original: , hello!

Translation: привет

常见问题

Chat translator 支持哪些 Minecraft 版本?

Chat translator 支持 Minecraft Java 版 1.21.11,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Chat translator 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。

评论

登录后评论和评分

SurvivalWorld Season 4 的其他作品

查看全部 →