Fou-lu 7 Posted April 1, 2020 I would like to know what are the possibilities of creating a plugin that allows using the google translation inside the emulator. It would look something like python library: https://pypi.org/project/googletrans/ Would it be possible to do something like that? Quote Share this post Link to post Share on other sites
meko 170 Posted April 1, 2020 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) 1 Fou-lu reacted to this Quote Share this post Link to post Share on other sites
Fou-lu 7 Posted April 1, 2020 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. Quote Share this post Link to post Share on other sites
meko 170 Posted April 1, 2020 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. 1 Fou-lu reacted to this Quote Share this post Link to post Share on other sites
Fou-lu 7 Posted April 1, 2020 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. Quote Share this post Link to post Share on other sites
Neffletics 9 Posted June 25, 2020 On 4/2/2020 at 12:50 AM, Fou-lu said: 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. I've thought of this but immediately scrapped the idea because players don't write properly in-game. 😕 Quote Share this post Link to post Share on other sites
Relzz 32 Posted August 30, 2020 I would rather use DeepL translator than google translator Quote Share this post Link to post Share on other sites
Fou-lu 7 Posted March 3 On 6/25/2020 at 10:32 AM, Neffletics said: I've thought of this but immediately scrapped the idea because players don't write properly in-game. 😕 On 8/30/2020 at 6:24 AM, Relzz said: I would rather use DeepL translator than google translator After more than 3 years and with the chatGPT API fully disseminated, what do you think of this topic of mine? Wrongly written messages, GPT can translate. GPT can even translate slang from the Ragnarok game world perfectly. Quote Share this post Link to post Share on other sites
Relzz 32 Posted March 4 20 hours ago, Fou-lu said: After more than 3 years and with the chatGPT API fully disseminated, what do you think of this topic of mine? Wrongly written messages, GPT can translate. GPT can even translate slang from the Ragnarok game world perfectly. That would require a lot of credits, you can just translate the .PO files using GPT then maybe use the GPT API for chatting and all that, sounds better for me, but it would still be really costly. Quote Share this post Link to post Share on other sites
4144 364 Posted March 4 for translation can be used any offline or online translator. but main issue in translation what format strings can be corrupted by auto translation. and need human for validate each format string line. Quote Share this post Link to post Share on other sites
Fou-lu 7 Posted March 6 On 3/4/2024 at 11:48 AM, Relzz said: That would require a lot of credits, you can just translate the .PO files using GPT then maybe use the GPT API for chatting and all that, sounds better for me, but it would still be really costly. I think exactly that. Using the GPT API only for chats. Regarding the issue of credit consumption, I haven't been able to measure how much this cost would be, but I believe it would be a useful feature to use on an international server. The game Ragnarok Online has always lived up to the MMO name, but nowadays the small number of players is causing them to play alone. A system that removes the language barrier between players, in my view, aligns perfectly with the sense of community that Ragnarok Online embodies. On 3/4/2024 at 12:54 PM, 4144 said: for translation can be used any offline or online translator. but main issue in translation what format strings can be corrupted by auto translation. and need human for validate each format string line. I think you didn't understand the topic's goal. The intention is to use a translation API to instantly translate conversations in chat between players. Quote Share this post Link to post Share on other sites
tararais 1 Posted April 29 You also have "free" options: LibreTranslate - Github (I have used it, its surprisingly quick but lacks on understanding - deepl for instance understand a lot better the context) but is free Free G translate - github (I haven't personally used it - however people seem very happy with it) Also, as of today, you have options available like LLaMa3-70B or LLaMa3-8B (which is very cost-effective and easy to run). You could develop a plugin that set's a multi-lingual chatroom, you could structure the translation service using a series of microservices. This way, you can isolate the translation tasks from the main game processes, ensuring heavy translation loads dont impact performance, each microservice would handle a part of the translation process independenly, making the system highly scalable imo. instead of using traditional HTTP requests, which can slow down interactions, use WebSockets. a more stable connection between the player client and your translation server. you can also cache the most commonly used translations to retrieve them instantly reducing the need to process the same thing over and over again, you can easily handle interpretation for the variations with NLP (NLTK - is very good). After a while you'd have enough data to scale your system more efficiently 1 Fou-lu reacted to this Quote Share this post Link to post Share on other sites
Fou-lu 7 Posted May 14 @tararais Thank you very much for all the tips. It will help me with a lot of things I haven't planned yet. I still have this project in my head, but I believe that I will soon try to put it into practice. On 4/29/2024 at 5:12 PM, tararais said: you can also cache the most commonly used translations to retrieve them instantly reducing the need to process the same thing over and over again, I had already thought about exactly that. 🙂 1 tararais reacted to this Quote Share this post Link to post Share on other sites