Vectron Translate
Vectron Translate
Description
Ever had players on your server who were speaking god-knows-what-language and you could not understand them? Vectron Translate allows you to set your language and then receive translations (using the Microsoft Bing Translator) when someone speaks in a language that is not your own.
Example Chat:
Permissions
- vectron.translate - Allows you to receive translations and use the /translate command and associated sub-commands. By default, all users have English set as their language.
Added in V0.2.2/0.3
- vectron.getlanguage - Gives access to /getlang (see below commands list).
- vectron.languages - Gives access to /languages (see below commands list).
- vectron.reload- Allows user to run /vectron reload.
Commands
- /translate - Allows you to check your current set language.
- /translate [language] - Allows you to set your language (e.g. /translate french would set your language to French).
- /translate off - Allows you to disable translations if you no longer wish to receive them. Can be re-enabled by setting your language.
Added in V0.2.2/0.3
- /translate text [text] - Translates [text] from auto-detected language into your set language (/translate text unas gatos returns "some cats")
- /getlang [player] - Gets the language of [player].
- /languages - Shows a list of supported languages in your language, or English if you have disabled translations.
- /vectron reload - Reloads the plugin config.
Setup
To use Vectron Translate, you will need to complete the 10 simple steps outlined on the Setup page. Failing to do this will mean you can't use the plugin as intended.
Configuration
- Client-ID - The Microsoft Translator Client-ID (EXPLAINED IN SETUP).
- Client-Secret - The Microsoft Translator Secret-Key (EXPLAINED IN SETUP).
Planned
- Automatically set language based on IP of user.
Sets based on locale, so technically added. - UUID support (for name changing in future).
Added.
News:
I have setup a bitbucket repo for the plugin, so if anyone wants to fix the bugs, or write new features, feel free to do so. When you're done, submit a pull request and once a week I'll compile the changes and submit the new jar to bukkit.
If you enjoy this plugin, please consider donating some amount to show your appreciation and buy me a cup of coffee ;)
@hice3000
The google translator service is no longer free for plugins.
Why dont you use Google Translator?
Works awesome.
Released v0.2 - Fixes a threading bug. Adds /translate off functionality (explained in description).
@ray73864
Thanks :)
Alrighty, will look into that error, get it patched up.
the second error with the ArgumentOutOfRange, that seems to happen when one says something and the language cannot be determined, so if you talk leetspeak, you will get that error. Or apparently even semi internet speak... i'll add in an error message instead of that ugly error.
As for the ideas, you can add the permission to only certain players if you like... that permission determines whether to translate for them. Although i suppose i could add a /translate off... ok
Couple of ideas:
- The ability to turn it off on a per-person basis.
- can't think of the other right now.
I had this appear to me in the chat a moment ago too, but it isn't in the logfile, so i'll do the best i can:
FartBrains (translated) : ArgumentOutOfRangeException: 'from' must be a valid language
Parameter name: from: ID=0818.V2_Json.Translate.D639CCB
This plugin is freakin' awesome.
Though we got a few issues on the console:
@Dommbringer
Third party program being the Microsoft translator service? Yes, that is the core of the plugin, what will be doing the actual translations. I decided to have people signup rather than using a plugin default, as if i were to use a default plugin account, everyone who uses the plugin would all take out of the pool of 2 million characters a month. This way, everyone gets their own 2 million characters a month bundle.
The signup is fast and easy, all you need is a Microsoft account, the setup page is linked above in the description.
So do we have to set up an account on this third party program?
@predawnia
Posted a link in the description, awaiting official approval.
@predawnia
It is heavily optimized, all the queries run in separate threads, and if you have 30 people who speak English and 1 who says something in French, it will send 1 query and send the translation to all 30 people, and a whole lot more, very optimized. Give it a try, on our server we did not see any performance infringement.
@predawnia
Hmm?
without all these registering stuff these would be awesome :(
How would this affect my server, performance wise?
It would be cool, if you have the download link :D