Jump to content
Fou-lu

Google Translate Plugin

Recommended Posts

You'd want to do the translation offline (not on a live server, on-the-fly) using a HPM plugin (such as generate-translations) to generate your po files and then you would use a script (maybe in python, so you could use that python lib you linked) to call the google "cloud translation" api and translate your po file. You could also put both the po generator and translation routine in the same HPM plugin (using generate-translations as base and expanding from there)

Share this post


Link to post
Share on other sites
1 hour ago, meko said:

You'd want to do the translation offline (not on a live server, on-the-fly) using a HPM plugin (such as generate-translations) to generate your po files and then you would use a script (maybe in python, so you could use that python lib you linked) to call the google "cloud translation" api and translate your po file. You could also put both the po generator and translation routine in the same HPM plugin (using generate-translations as base and expanding from there)

Yes, this is a very good way to automate translations.

 

But another thing I wanted to do was to be able to translate the messages of the players in real time. For example, a Spanish-speaking player speaks in your language and the emulator, when sending the message package to another player's client, translates it from Spanish into English for the other player who is English-speaking.

 

In this way it would be possible to create a server where players of different languages can communicate with each other. Is my idea feasible or can you imagine any limiter that hampers this?

 

Thank.

Share this post


Link to post
Share on other sites

You can hook into the chat and whisper-related functions with a HPM plugin and then call the Google Cloud Translation API but this will be very costly because you have to translate every single message into the local language of every listening player so if you have a player speaking English and there's 50 players around them and they all use a different language you end up sending 50 translation requests to the API. You could do the translation client-side but you would have to build your google translate logic directly into the RO client. Keep in mind that this will also increase lag because you wait on API responses before displaying the message.

Share this post


Link to post
Share on other sites
8 minutes ago, meko said:

Keep in mind that this will also increase lag because you wait on API responses before displaying the message.

 

This was one of my concerns that came to my mind, but perhaps applying this logic only to whispering messages is feasible because it is one to one translation and not one to several.

 

12 minutes ago, meko said:

You could do the translation client-side but you would have to build your google translate logic directly into the RO client.

 

Do you mean needing to edit the hexed or create a special diff or dll file? I can well imagine how to do this on the part of the emulator, in which I will try to test your suggestion to create a plugin, however on the part of the client it is still kind of confusing to me.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.