NewTrans

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.

Example of chat with NewTrans installed
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 http://dev.bukkit.org/profiles/TheChampTFMineCraftLegend/) 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

CommandDescriptionPermission
/newtransMain command, if you can use this you can receive translationsnewtrans.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
/languagesLists the available languagesnewtrans.languages
/sayStandard /say command, minor modification for translation supportbukkit.command.say
/msg <player> <message>Inter-player messagingnewtrans.message
/r <message>Replies to the player who sent the latest message to younewtrans.message
/langinfo <language>Displays the name and ISO codes of specified language.newtrans.langinfo
/langreportBasically 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 (http://thesystemn.enjin.com/), I downloaded a translation plugin named VectronTranslate (http://dev.bukkit.org/bukkit-plugins/vectron-translate/), 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 http://translate.google.com/ 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 https://github.com/BAI1/NewTrans

Submit bug reports through comments, PMs or by opening tickets/issues here or on Github.

Check out my Enjin account if you want at http://thesystemn.enjin.com/profile/1380923

Thank you.
BAI1


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    86167
  • Created
    Oct 27, 2014
  • Last Released File
    Mar 5, 2015
  • Total Downloads
    3,445
  • License

Categories

Members

Recent Files