rssfetchremote_Translator_GUI (mta-translator)

Rate:You need to be logged in to vote
Rating:4 (1 Vote)
This is a fetchremote GUI resource for MTA that allows your MTA server to auto detect and translate foreign language

Not only will it auto detect and translate foreign language it allows you to translate any text to any language you wish on demand

Every users chat gets detected for servers choice language, If not server choice language then text is translated to server language
and sent to each users translator chat log to view the translation.

Under the server chat translation logs is a user input field and a button and combo box to select language.
Here you can convert any language to another, Simply enter the text select desired output language and hit convert.
The translated text is then sent to only your chat log window.


working languages

When the user types in global chat The MTA lua resouces uses the fetchremote function of MTA to make a PHP post request

It sends the text this user sent in chat to detect.php at your URL
detect.php then uses Yandex Translate API to detect what language it is

and post the result to trans.php
trans.php then checks if the detected language is other than english "can be changed"

If the detected language is not english then it makes a API call to translate the language

The result is then sent back to MTA if the translation was successfull

So to sum it all up when ever a user types in global chat and if it is in a foreign language this can auto convert it for you.

This version uses a GUI and allows you to convert any text to another language on demand.

Requires you have a Yandex Translate API KEY

you can get it free here

** SETUP **

Edit acl.xml
<right name="function.fetchRemote" access="true"></right>

Now edit detect.php and trans.php so they have your API KEY also replace URL inside detect.php
where it says URLGOESHERE

Edit smain.lua inside sockets resource replace the URLGOESHERE with the URL to detect.php
Start server and now the chat will auto detect and translate foreign languages


Comments (3) | Download latest version | Report

Version history

Version Publish Date Changes
1.5.0 2019-02-08 12:06:11 Download
17.0.0 2019-02-05 19:29:49 Fixed issue onplayerchat so all player chats are detected/translated rather than one at a time all using unique sockets.

Download this version for fluid chat translation
16.0.0 2019-02-05 19:15:46 Update allows all player chats to be detected and translated, Before all player chats were using the same socket causing some issues if they type to fast. Now every user gets unique socket for language detect/translation. Download
15.0.0 2019-02-05 06:59:38 First public release Download