NewTrans
NewTrans 最初是为了实现 Yandex API 的使用而创建的,后来经过编辑以适配 Google API。NewTrans 支持将 90 种语言进行翻译,以便更广泛的国际受众能够与你以及其他外籍玩家进行交流。国际化是拥有服务器的重要组成部分,特别是如果你希望始终保持高在线人数的话。重要的是,玩家之间能够无障碍地沟通,避免因潜在的语言障碍而产生过多问题。
安装 NewTrans 后的聊天格式与默认 Minecraft 聊天格式以及大多数 Bukkit 服务器上的聊天格式截然不同,使其在需要时能够“脱颖而出”。图片将很快更新,以反映更多功能和一些更改。
最新插件更改/新闻
2014-12-10:该插件可在 1.7.10 和 1.8(由 告知)版本上运行。不确定使用的是 Bukkit 还是 Spigot,但未明确说明。不过根据我提出的几个问题,我认为测试使用的是 Bukkit 的 1.7.10 版本以及 Bukkit(来自 Spigot 团队)的 1.8 快照版本。BAI1
功能
- 通过 Google API 实现实时聊天翻译
- 支持 90 种语言
- 支持对 /msg 和 /r 命令中的消息进行翻译(并支持自定义消息格式)
- 支持对 /say 命令发送的消息进行翻译
- 如果设置正确,能够识别玩家的语言
- 管理员可以为玩家设置语言
- 可自定义“无权限”提示消息
- 可自定义默认语言和控制台语言
- 定期检查连接状态。
- 在 language 参数中指定你的语言(例如:输入 /setlang にほんの 即可设置为日语)
命令和权限
| 命令 | 描述 | 权限 |
|---|---|---|
| /newtrans | 主命令,如果你能使用此命令,你就可以接收翻译 | newtrans.use |
| /getlang <player> | 获取 <player> 存储的语言 | newtrans.getlang |
| /setlang <language> | 将你的语言设置为 <language> | newtrans.setlang |
| /setlang <player> <language> | 将 <player> 的语言设置为 <language> | newtrans.setlang.others |
| /languages | 列出可用语言 | newtrans.languages |
| /say | 标准 /say 命令,为支持翻译进行了轻微修改 | bukkit.command.say |
| /msg <player> <message> | 玩家间私聊 | newtrans.message |
| /r <message> | 回复给你发送最新消息的玩家 | newtrans.message |
| /langinfo <language> | 显示指定语言的名称和 ISO 代码。 | newtrans.langinfo |
| /langreport | 基本上是对所有人执行批量 /getlang 操作(灵感来源于 MaxBans 的 /ipreport) | newtrans.getlang |
| /getmsg from:lang to:lang <message> | 将 <message> 从 lang 翻译到 lang。 | newtrans.getmsg |
安装和设置
安装
1. 下载最新的 NewTrans.jar。
2. 将此 jar 文件放入服务器的 plugins 文件夹中。
3. 启动服务器以生成配置文件。
4. 根据需要打开并编辑配置文件
5. 重新加载插件(/newtrans reload),完成。
已知错误
- 无,发现任何错误请向我报告
计划中的功能
- 基于以下任一条件的自动语言检测:用户 IP 地址/地理位置,或从 <player> 的聊天消息中检测到的最常见语言,或客户端区域设置选择(我需要一种兼容 Cauldron 的解决方案。Bukkit 有解决方案,但它不能在 Cauldron 上工作)。
插件历史
为了促进我自己的服务器 TheSystem Pixelmon()的国际化,我下载了一个名为 VectronTranslate()的翻译插件,它使用 Bing 翻译 API 来提供游戏内聊天的实时翻译。然而,该插件虽然未让我失望,但存在很多漏洞,因此我对其进行了修改,并在 Bitbucket 上与作者提交了 PR,作者接受了这些更改并添加了一些自己的更改以更新插件。
默认情况下,使用的翻译 API 除非付费,否则每月限制 400 万个字符,当我的服务器在三周内使用了 800 万个字符时,这成了一个严重问题,所以我不得不寻找另一个插件或另一个 API。我搜索了一些翻译 API 并找到了 Yandex,它以 XML 和 JSON 格式提供翻译服务。我在 Yandex 上注册了账户,并开始为我的服务器创建一个新的翻译插件,以解决字符数量限制的问题。我发现处理 JSON 更容易,而且我在其他插件中看到过 JSON 的使用,所以我尝试了一下,找到了一些在 Java 中读取网页上的 JSON、过滤它并显示它的在线方法。
我实现了翻译支持功能以及一个用于切换语言的基础命令,但在需要为这个插件命名时便止步于此。由于缺乏创意,我只是把脑海中浮现的几个词拼凑起来,于是就有了“New Translation Plugin”(新翻译插件),因此我将它命名为 NewTrans。
该插件通过将 API 从 Yandex 切换至 Google,更新以支持更广泛的语言。在成功实现之前,我花了至少 8 小时进行代码实验。自版本 1.1.0 及以上起,我们已使用 Google API,不再需要 Yandex 的 API 密钥。这是一个重大升级,因为新增了 36 种语言,且更改后没有已知字符限制。翻译结果与你在 [此处] 看到的一致,语言范围也相同。
计划贡献?
欢迎在 Github 上提交包含你建议更改内容及其理由的 PR(拉取请求),我会考虑你的提议。Github 地址为
请通过评论、私信或在 Github 或本页面提交工单/问题来报告错误。
如果你想查看我的 Enjin 账号,请访问
谢谢。
BAI1
NewTrans
Created for the purpose of implementing the use of the Yandex API, and later edited to suit the Google API, NewTrans supports the translations of 90 languages to allow a larger international audience to communicate with you and other players of foreign descents. Internationalisation is an important part of owning a server especially if you want high player-counts at all times, and it's important that players are able to communicate between one another without too many issues generated by their potential language barriers.
The chat with NewTrans installed has a distinctively differing format to default MC and most chat formats on Bukkit servers allowing it to "stand out" somewhat where needed. Image will be updated soon to reflect more functionality and some changes.
Latest plugin changes/news
2014-12-10: Plugin does work on 1.7.10 and 1.8 (noted to me by ) versions. Not sure whether Bukkit/Spigot, was not specified however from a few questions asked I believe versions 1.7.10 of Bukkit and 1.8 snapshops of Bukkit (from the Spigot team) were used to test. BAI1
Features
- Live chat translations from the Google API
- Support of 90 languages
- Support of translations in /msg and /r (plus custom format for messaging)
- Support of messages being translated from /say
- Ability to find a language of PLAYER if set properly
- Ability for admins to set player languages for players
- Customisable "No-permission" message
- Customisable default-language and console-language
- Regular interval connection checking.
- Specifying your language in language (EG: /setlang にほんの would work for Japanese)
Commands and permissions
| Command | Description | Permission |
|---|---|---|
| /newtrans | Main command, if you can use this you can receive translations | newtrans.use |
| /getlang <player> | Retrieves the stored language of <player> | newtrans.getlang |
| /setlang <language> | Sets your language to <language> | newtrans.setlang |
| /setlang <player> <language> | Sets <player>'s language to <language> | newtrans.setlang.others |
| /languages | Lists the available languages | newtrans.languages |
| /say | Standard /say command, minor modification for translation support | bukkit.command.say |
| /msg <player> <message> | Inter-player messaging | newtrans.message |
| /r <message> | Replies to the player who sent the latest message to you | newtrans.message |
| /langinfo <language> | Displays the name and ISO codes of specified language. | newtrans.langinfo |
| /langreport | Basically mass /getlang on everyone (inspired by /ipreport from MaxBans) | newtrans.getlang |
| /getmsg from:lang to:lang <message> | Translates <message> from lang to lang. | newtrans.getmsg |
Installation and setup
Installation
1. Download the latest NewTrans.jar.
2. Place this jar in your plugins folder on your server.
3. Start the server to generate configs.
4. Open and edit the config as you see needed
5. Reload the plugin (/newtrans reload), you're done.
Known bugs
- None, report those you find to me
Planned features
- Automatic language detection based on EITHER user IP address/geolocation OR the most common language detected in chat messages from <player> OR client locale selection (I need a Cauldron compatible solution for this. There is a solution for Bukkit but it does NOT work on Cauldron).
History of the plugin
To facilitate the internationalisation of my own server, TheSystem Pixelmon (), I downloaded a translation plugin named VectronTranslate (), which uses the Bing translation API to provide live ingame translations of chat. The plugin failed to disappoint me however was buggy so I modified it and made a PR on Bitbucket with its author, who accepted the changes and added some of his own to update the plugin.
By default, the translation API that is used limits you to 4 million characters per month unless you pay, which was an issue when my server went through 8 million chars in three weeks, so I had to find another plugin or another API. I did some searching for Translation APIs and found Yandex, which offered translations in XML and JSON formats. I made an account with Yandex and started working on creating a new translation plugin for my server due to the character issue. I found that working with JSON was easier and I'd seen JSON be used elsewhere in other plugins so I tried it out found a few online methods to read JSON from an online webpage, filter it and display it, in Java.
I built the translation support and a basic command to change languages, and that's as far as I got before I needed a name for the plugin. Being unoriginal and me, I just put together the first few things about the plugin which came into my mind, that being New Translation Plugin, so I named it NewTrans.
The plugin was updated to support a wider range of languages by changing the API from Yandex to Google. The change took at least 8 hours worth of experimenting with code before I got it working. As of version 1.1.0 and above we are on the Google API and the API key from Yandex is no longer required. A significant upgrade since there is an additional 36 languages and no known character limit imposed by changing. The translations are exactly the same as you would see them on and the range of languages is the same too.
Planning on contributing?
Feel free to make a PR on Github with your suggested changes and a reason as to why and I'll consider your proposal. Github URL is
Submit bug reports through comments, PMs or by opening tickets/issues here or on Github.
Check out my Enjin account if you want at
Thank you.
BAI1
下载 NewTrans
下载 NewTrans
下载 NewTrans
下载 NewTrans
下载 NewTrans
下载 NewTrans
下载 NewTrans
下载 NewTrans
下载 NewTrans
下载 NewTrans
本次更新包含 1.3.2
修复:
- 无法通过 /setlang PLAYER LANGUAGE 命令设置其他玩家的语言
- 在使用 AuthMe 登录前,聊天事件被错误翻译
BAI1
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
自定义你的Minecraft头像!
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
评论 0
登录后参与评分
还没有评论,来抢沙发吧