Easy Game Translator

Easy Game Translator: Real-Time Game Translator!
Easy Game Translator is an intuitive software application developed with the support of research and various libraries. Its goal is to make life easier for gamers who want to play titles that are not available in their native language, eliminating the need to learn a new language or rely on manual translators all the time.
I often came across games, especially RPGs and Visual Novels, in languages other than my own, with no translations available. This forced me to rely on translation websites, manually typing each sentence I didn't understand. Although this process helped me learn a little about other languages, I didn't always want to "study." Sometimes, I just wanted to relax and enjoy the game. That is exactly why I developed this program: to solve this problem by translating text in real time through continuous screen capture and free translation services.
Important Notice!
► When installing the program, your system may flag it as a "Virus" due to its continuous screen capture feature, which is enabled by the user. However, the captured images are not sent over the internet. Only the text recognized by the OCR (Optical Character Recognition) system is sent to enable online translation. You can view the capture history in the settings. Since this is an open-source program, you can review how the entire system works in the GitHub repository if you still have any concerns.
GitHub: https://github.com/cleitinhodev/easy_game_translator
Note: Even so, it is important to AVOID CAPTURING sensitive data, such as documents, passwords, and personal information! As mentioned earlier, text is sent to third-party services to perform online or AI-powered translations. The user is entirely responsible for the information they choose to send.
Step 1: Setting Up the System

When you launch Easy Game Translator, you will see the home screen, which features a moderate number of buttons. Although it may seem a little intimidating at first glance, the software is extremely easy to use. To make the explanation more practical, we will use a game screen as an example.

As we can see, the text is in English, but it could be in any other language. To start capturing, we need to configure four important settings: Alphabet, OCR, Translation, and Interval. Let's take a closer look at each of these settings below.

1 - Alphabet
Each language may have its own set of characters, including the letters and symbols used for writing. Easy Game Translator provides several options, such as Japanese Kanji. This setting helps the system determine what type of text it should recognize and translate. Sometimes, the OCR engine can detect the text automatically, but by helping it identify the correct character set, you can significantly increase the chances of successful recognition.
It's important to understand that the alphabet does not necessarily correspond to a specific language. For example, Spanish and French share the same character set, so you don't need to change this setting when switching between them. Once you've selected the appropriate alphabet, you can move on to the next step.

2 - OCR
OCR (Optical Character Recognition) is the technology responsible for recognizing characters in an image and extracting their content as text, allowing the computer to interpret and use it for translation.
By default, Easy Game Translator comes with RapidOCR integrated, but you can also install other engines, such as Tesseract and EasyOCR. This is recommended because each OCR engine has its own characteristics and may deliver better results depending on the language, font, and quality of the text displayed in the game.
Since these tools are external programs, each one has its own installation process. If Easy Game Translator does not detect them automatically, you can manually specify their installation paths in the settings.
Additionally, some parameters, configuration files, and logs can be found in the following directories:
-
C:\Users\your_username\AppData\Roaming\Easy Game Translator
-
C:\Users\your_username\AppData\Roaming\EasyGameTranslator
These folders may store general settings and other components used by the program. The availability of these files may vary depending on the version and installation.
Once you've selected and configured your preferred OCR engine, we can move on to the next step.


3 - Translation
In this step, you define the target language, meaning the language in which you want to receive the translated text. Easy Game Translator supports several of the world's languages, with plans to add more options in the future.
There isn't much to configure here: simply select the language in which you want to read the game's dialogue and text.
4 - Interval
The interval is a very important setting! It determines how long the program waits between screen captures to detect new text and perform translations.
As a starting point, we recommend an interval between 1.3 and 2 seconds. However, this value may vary depending on your computer's performance. On older machines or systems with limited processing power, increasing the interval can help reduce the processing load and prevent the system from becoming overloaded.
Easy Game Translator also includes features such as an internal cache and image processing, which help optimize performance and avoid unnecessary work.
Keep in mind: capturing the screen more frequently does not necessarily mean better translations. A well-adjusted interval that allows text to be recognized accurately and processed properly can provide a much better experience than taking excessive screen captures.


Step 2: Text Capture
This is where the magic happens! We will select the capture region, and to make text recognition and interpretation as easy as possible, here is a list of things you should do or avoid when selecting a region:
► Capture text with readable fonts: Avoid unusual fonts or those containing unnecessary decorative elements, as they can interfere with text recognition.
► Select only the area where the text appears: Usually, the dialogue box is sufficient. Do not select the entire game screen, as this will likely produce a meaningless jumble of characters.
► Avoid moving the game window after selecting the area: The capture region remains fixed at the position you originally selected. If you need to move the window, simply capture the new region again.
► If possible, change the dialogue box color to contrast with the text and reduce its transparency in the game's settings: Many Visual Novels offer this option. If the dialogue box is too transparent, it can interfere with the software's ability to recognize the text. Remember, the goal is to make the text as easy to read as possible.
► You can also adjust certain settings under OCR configuration: In the image preprocessing section, you can modify various filters to separate visual elements more accurately.

Hold On!
Don't start changing the settings just yet... Let's return to the home screen and perform the basic procedure first to understand how everything works.
Position the window somewhere appropriate so that it doesn't cover the dialogue box of the game you're playing, then click "Select Region." This will activate a tool that lets you select an area of your screen. Simply click and drag your mouse over the area where the characters' dialogue appears, then release the mouse button. Don't worry if you make a mistake; just repeat the process.

The captured image will appear in the panel on the left. Notice that the dialogue box borders were not included, as even these can interfere with text recognition. The dimensions in pixels will also appear next to the button, indicating the exact area the program should use for OCR processing.

Finally, click "Start." Within a few seconds, Easy Game Translator will spring into action, capturing the image, extracting the text, and searching for a translation. The resulting translation will appear in the panel on the right.
By default, the program uses several translation libraries in an order that can be customized by the user. It always prioritizes whichever option returns a result first. When AI translation is enabled, it is placed at the top of the queue because it delivered the best results in our tests.

Now for a "Moment of Honesty"...
Despite extensive testing and the addition of new features in recent versions, the program won't always work miracles. Sometimes, it may stop translating because one of the translation services goes down, or you may need to try several OCR combinations before finding one that works. If necessary, start the process over: select the region and click Start again. You can also capture a different region and then return to the original one to "reset" the cache. There are several ways to keep the program running consistently for long periods. I've personally completed entire games this way! One rule I always follow in my projects is:
"There's no point in creating something I wouldn't use myself."
So, be patient at first. In many cases, when the program fails, it's simply due to an incorrect setting that can be adjusted. Over time, you'll get a better understanding of how everything works. And I can assure you that I'll continue working on improvements to support as many languages as possible.
Floating Window:
Naturally, you won't want to keep a huge window covering your game screen. So, after configuring everything and starting the translation, you can enable a very useful feature that I like to call "Box Mode."

Basically, it opens a small, resizable window that you can move around and pin in place. It displays only the translation output, meaning everything that appears in the program's second panel. This way, you can minimize the main window completely and keep your game running in full-screen mode.
But wait! There's more! This window stays on top of other windows in the system, and even screen captures won't capture it. This means you can literally place it right over the game's dialogue box! Seriously, this makes the experience much more immersive.
Manual Translation

Manual translation is designed for those moments when you come across a sentence that nothing seems to be able to translate. This can happen because of unusual characters, on-screen effects, or even dialogue spoken by characters whose meaning you'd like to understand.
To handle these situations, a simple translation window was added directly to the program. There's nothing complicated about it: enter the original sentence on one side, and the translation will appear on the other.
Dual Channel:

Some games have dialogue boxes both above and below the characters, and constantly switching the capture region would certainly be a hassle. To solve this problem, the Dual Channel feature was created. It captures and translates two regions simultaneously. You probably won't use it very often, but when the situation calls for it, I guarantee it will make a big difference.
It works exactly like the single-channel mode, except that you'll have an additional capture button in the options, with each button responsible for its own region. Both channels share the same OCR and translation settings, so this feature won't work if you try to capture two different languages at the same time...
Seriously, though, who would make a game with two different languages anyway????
Settings:
Now that we've covered the main features of Easy Game Translator, let's talk a little about its settings. There are quite a few, but most of them are easy to understand. Since this tutorial is only a basic introduction, I'll avoid overly technical terms and leave the more "boring" details for a more in-depth explanation on GitHub.
The Settings button is the one with the gear icon. When you click it, a tab will open with several options. I'll go over the most important ones step by step.
General:

In the General tab, you'll find several settings related to the interface, shortcuts, fonts, and options that affect how the program operates. Each setting comes with a descriptive text, and some even disable animations to make the program run more smoothly.
You can also enable global shortcuts, but doing so requires Python and certain libraries to be installed on your system. This is highly recommended, since much of the program's backend relies on Python, and installing these dependencies allows you to enable additional advanced features.
However, if you're new to programming, don't worry! The program can already do a lot of things out of the box.
OCR:

Remember what I said about Python? This is where it becomes especially important. Many OCR engines can be installed using Python through the terminal. However, for Tesseract, you'll need to visit its official repository and download one of the available versions. It's a good idea to install support for as many languages as possible.
Tesseract: https://github.com/UB-Mannheim/tesseract/wiki
Once everything is installed, click "Recheck", and Easy Game Translator will automatically detect the available engines. You can even test them directly from the program.
Due to frequent updates, some engines may temporarily stop working. I'll do my best to keep everything up to date, so remember to check for updates to both the program and its external components from time to time.
Translation:

Here you'll find the available online and offline translation engines. You can enable all of them at once if you wish. The displayed translation will always come from whichever engine responds the fastest.
In some cases, certain engines may produce better results than others, so it's worth evaluating which one best suits your needs. You can also adjust their priority using the arrows next to each option.
Cache Mode uses only translations that have already been saved in the system. Its purpose is to avoid making unnecessary repeated requests.
For Microsoft/Bing translation, you'll need your own Azure key, which may consume credits depending on how the service works, so be sure to keep an eye on your usage!
Replace:

There are situations where the program starts translating things it shouldn't, such as symbols or names, due to linguistic differences. In this tab, you can create rules that are checked during every capture, allowing the program to block or allow specific words, verbs, or entire phrases.
For example, in English, consider the phrase "I love You." Notice how the uppercase letter "I" can look very similar to a lowercase "l." Sometimes, OCR engines struggle to distinguish between these subtle details.
With the right rules in place, you can avoid these kinds of conflicts across various languages, making translations even more accurate.
Artificial Intelligence:

Configuring Gemini
This section is VERY important, because this is where many people get confused. First of all, Easy Game Translator does not have its own built-in AI. Instead, it uses code provided by Google to access Gemini through its API.
To enable this feature, you'll need to create an account on the official Google AI Studio website and generate an API key. This is essentially a code that you must enter into the "Gemini Key" field, as shown in the image above.
This key is personal and should never be shared with anyone. If you suspect it has been compromised, return to the website, delete it, and generate a new one.
Don't worry, Easy Game Translator stores this key in a specific location where you can review or delete it if necessary.
But why is this so important? The answer is simple: unlike online translation services, Gemini consumes tokens. The free tier has a basic usage limit, so you can use it as long as you're mindful of your consumption.
The biggest concern is for users who pay for a plan, as their usage limits are much higher. Without proper awareness, you could end up consuming a large number of tokens due to repeated translation requests.
That's why it's extremely important to monitor your usage at all times. Whenever you finish playing, don't leave the program running with the AI "eating up your credits"! It's your responsibility as a user to keep an eye on your consumption at all times, okay?
Configuring Ollama
Ollama is an AI platform that can run locally on your computer without an internet connection. In a way, this would allow the program to operate entirely offline, turning Easy Game Translator into a translation beast!
However, not everything is sunshine and rainbows. As you might imagine, you'll need a reasonably powerful computer. Even when running simpler Ollama models, at least 8 GB of RAM and a decent graphics card are recommended. The better the model, the better and faster the results will generally be.
You can download models directly from the official Ollama website and test them as much as you like. In the settings, simply specify the model and its predefined location. Once you launch it, if the model is compatible, Easy Game Translator will detect it and give it priority.
Unfortunately, my computer is a bit of a potato, so I was only able to use the simplest model effectively.
History:

In this tab, your translation history is stored, displaying the original text, its translation, and its source. Besides allowing you to review previously translated text, it also helps the system avoid making repeated requests for identical phrases, providing instant translations in certain cases.
You can also clear this history if it becomes too large.
Updates:

In this section, you can check the components installed on your computer that help Easy Game Translator function. Here, you'll find a simple window that can be expanded to display advanced details and, in some cases, even guide you through installing specific features.
Some of these components can be quite demanding in terms of storage space, taking up several gigabytes (GB). Therefore, it's best to install only the components you consider necessary.
Report Bugs:

This is a simple Logs window, displaying real-time records of what's happening within the system. It's primarily intended for developers, allowing them to identify errors and potential improvements.
If necessary, you can access this folder and save the logs for further analysis.
Conclusion:
I hope Easy Game Translator can help you in some way. I know all too well how frustrating it feels to be unable to play a game simply because it's not available in your native language.
This tool was created to help you enjoy the same experience as someone who can play a game and understand every word, without having to switch to a manual translator every 10 seconds. Of course, it won't solve every problem, but it aims to lend a helping hand.
I'll continue working to improve this project while bringing new ideas and features to the table. I'd also like to thank all the developers who have contributed to the various OCR, translation, AI, and other technologies that this tool relies on. This isn't the work of just one person, but the result of thousands of people sharing and building upon accumulated knowledge.
I'd also like to thank you for using my software and supporting its development in any way you can.
Thank you! :)