Trans
Trans
A simple plugin that translates ingame chat messages to the language of your choice using the Google Translate API, with a simple [YQL response parser](http://developer.yahoo.com/yql/console/?q=select %20from%20google.translate%20where%20q%3D%22This%20is%20a%20test%22%20and%20target%3D%22de%22%3B&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys#h=select%20%20from%20google.translate%20where%20q%3D%22testing testing%22%20and%20target%3D%22es%22%3B) using the default Yahoo YQL tables. The json-simple
library that is shipped with Bukkit is used for parsing.
Trans is intended as a replacement of SayAgain, but one that actually works, handles encoding properly, is FOSS, and includes a proper parser (from 1.0.2b). It has also been used as an April Fools joke. It should be compatible with every Bukkit implementation > 1.4.7R1.0.
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
The source code is licensed under the LGPLv3 license.
Installation
Drag and drop into your /plugins folder.
Configuration
lang:
a 2-letter ISO 639-1 Code
uppercase:
whether or not to capitalize the translated message
Commands
/trans
- reloads the config
Permissions
trans.reload
- permission to reload the config
Todo
-
More commands
-
More permissions
-
More transparency
@ryanrmc
Oh nevermind.
Does this translate ALL google translate plugins? I can't get Malay to work...
Could a server enforce an 'English only' rule by translating everything into english?
@dainiusb
The actual configuration isn't complicated at all. I'm somewhat busy, but it's sending individual chat events to each player that's the complicated part (the different messages part).
@vemacs
I was thinking about creating a file that stores all players settings and loads all players data when they write something in chat. Then checks who has what language setting and everyone receives different messages.
I'm just not sure how much time it takes to load such file and is it resource intensive.
@dainiusb
I've been working on other stuff at the moment, however, I should be able to ship that relatively soon. It is somewhat complicated, actually.
Also, I really doubt that Google encourages the use of this API, however, since YQL uses it, and thus a lot of applications, I doubt that they'll break it either. Keep that in mind.
In addition, the original purpose was just for "trolling" people...
Yeah please let each player to select their own language. Without it it's just for trolling people. And please do this fast because this is the only one translation plugin working at the moment. I guess they've changed microsoft translation api or something. Since this uses google it's all good. I need this very much in my server because people from random countries comes to play and not everyone can speak english.
Thank You
Can you make a command so people can type /tran spanish to translate it all to spanish for example?
@S0Nx0FxAxS0N
Read the config?
For me it converts everything to CAPITAL LETTERS, whyyyy?...
Looking forwards to that command it would be really useful
@Matt19901
It's in the "more commands" of the Todo
can you do it so players can chose with commands what language they want all the text in?
@CrazyLB
Thanks! Remember, google translate sometimes has spacing issues. I'm trying to resolve that in the PostProcess class.
Works like a charm!
awesome plugin, gotta test it soon
@Rickious
Thanks! As for the resource intensive part, it's not resource intensive at all. There is a tiny delay as for latency, but it's not noticeable if your server has a decent internet connection.
As for signs, this was originally made for an April Fools joke (still in planning) to make the entire server sound like a group of Brazilian gamers.
Huea.
Sounds like an excellent idea. Would this be very resource intensive?
If this proves to large of a project in tearms of lag etc, maybe scale it down and work it into a /socialspy where it would translate key phrases (configurable), like cheat, lag, grief, secret etc. One command like '/trans add cheat' would then add all the translations of the word using google translate api, using whichever languages you have in the configuration?
Also, translating signs would be handy too, make a sign, aim at it '/trans sign french' done. Obviously this could be done manually, but this wy would be much easier although I admit the grammar would be out but better than no translations.
Whatever extent this ends up, it will be very usefull.