Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

LonaRPG MTL

Machine translation tool for LonaRPG · By Tetragramat

AI translation

A topic by vuphuong878 created Sep 21, 2025 Views: 838 Replies: 3
Viewing posts 1 to 2

Would it be possible to add an AI translation function? Users could then provide their own free API keys, such as for Google's Gemini Flash 2.5, to achieve higher-quality translations.

Developer(+1)

Can you send me documentation how that should be integrated?

(1 edit)

https://ai.google.dev/docs
Rather than asking for a rough translation, it would be better to formalize the prompt.
Also, considering the level of sexual censorship in Gemini and openAI, it is better to create options for both.
What is certain is that the lower the cost, the lower the level of censorship.

+) Make the user enter the api key so that money doesn't slip out of your wallet

I asked chatgpt to reply, here you go: 

You can integrate AI translation support by allowing users to enter their own API key and model settings in the mod’s configuration. For example, with Google’s Gemini Flash 2.5 (via the Gemini API), it would just need to send the text to translate as a prompt and return the output text.

Here’s the main documentation for Gemini’s API: 🔗 https://ai.google.dev/docs

Specifically, you’d want to look at the Text generation / generative models section — you can send a translation request like this:

POST https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent Authorization: Bearer [API_KEY] Content-Type: application/json  {   "contents": [     {"parts":[{"text": "Translate this Japanese text into English:\n\nこんにちは"}]}   ] }  

Then you’d parse the response and replace the in-game text accordingly. Let me know if you’d like a sample Python or C# or some other implementation!