Switch screen OCR translation plugin based on Tesla
Hi, I'm shipengliang.
There are some games on the market that do not have English. If they can be translated in real time, more people will have the opportunity to experience different games.
Recently found a great plugin that can do OCR on screenshots and translate them into the target language using Google Translate.
Based on the author's authorization, I wrote a guide, so I came here to publish a tutorial, hoping to help interested students.
This plugin wrote by https://github.com/kawaii-flesh, GitHub Link: https://github.com/kawaii-flesh/TraNX/blob/main/README-en.md
If you are not a beginner, you can directly visit the GitHub link above to deploy the environment and use the plugin yourself.
The following tutorial is only for beginners. You should already installed Tesla in your switch.
Server deploy
GitHub Link: https://github.com/kawaii-flesh/TraNX-Server/blob/main/README-en.md
Switch deploy
There are some games on the market that do not have English. If they can be translated in real time, more people will have the opportunity to experience different games.
Recently found a great plugin that can do OCR on screenshots and translate them into the target language using Google Translate.
Based on the author's authorization, I wrote a guide, so I came here to publish a tutorial, hoping to help interested students.
This plugin wrote by https://github.com/kawaii-flesh, GitHub Link: https://github.com/kawaii-flesh/TraNX/blob/main/README-en.md
If you are not a beginner, you can directly visit the GitHub link above to deploy the environment and use the plugin yourself.
The following tutorial is only for beginners. You should already installed Tesla in your switch.
Server deploy
GitHub Link: https://github.com/kawaii-flesh/TraNX-Server/blob/main/README-en.md
- Download and install Python: https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe
- Download and unzip to drive C: https://github.com/kawaii-flesh/TraNX-Server/releases
- Open cmd command, and go to the TraNX-Server folder:
Code:
cd C:\TraNX-Server-4.0.0 - Enter
and press Enter to create a virtual environment (this command only needs to be executed once).Code:
python -m venv tranx-venv - Enter
and press Enter to activate the virtual environment.Code:
tranx-venv\Scripts\activate - Copy and paste the following instructions for installing related dependencies (only need to be executed once) into the cmd window and press Enter:
-
Code:
pip install paddlepaddle==2.6.2 -f https://www.paddlepaddle.org.cn/whl/windows/cpu-mkl-avx/stable.html pip install paddleocr==2.10.0 pip install flask==3.1.0 pillow==11.0.0 opencv-python==4.11.0.86 sentencepiece==0.2.0 protobuf==3.20.2 requests==2.32.3 symspellpy==6.9.0 pip install googletrans==4.0.0-rc1 - Enter
and press Enter to start service with Google translate.Code:
python server.py --translator google - If your firewall prompts whether to allow access, allow all.
- Only then can your Switch access your service through the LAN. If there is no error, the service on the computer is set up.
- If you need to shut down the server, activate the cmd command window and press the shortcut key Ctrl+C to terminate the service.
Switch deploy
- Download exefs.nsp: https://github.com/kawaii-flesh/nx-ovlloader/releases
- Replacement it to the directory sdmc:/atmosphere/contents/420000000007E51A
- Download and unzip TraNx : https://github.com/kawaii-flesh/TraNX/releases
- Copy the atmosphere and switch folders to the root directory of the memory card.
- Call out the Tesla floating layer and select the plug-in starting with TraNX. At this point, a green pixel block will appear in the upper left corner of the screen.
- Press the L joystick once and the pixel block in the upper left corner will turn yellow, which represents touch interaction mode.
- Press the left arrow key, the pixel block in the upper left corner disappears, and the TraNX translation plug-in is exited.
- In DBI's MTP mode or Hekate's USB mode, copy the
file to your computer.Code:
/config/TraNX/config.ini - Open the ini file, change the 127.0.0.1 after the uploadURL to the LAN IP of the computer where the service is located, and then overwrite the configuration file.
- The configuration of Switch is now complete. As long as the computer LAN IP does not change, there is no need to edit the configuration file.
- Start the game you want to translate, call out the Tesla pop-up window, select the plug-in starting with TraNX, and a green pixel block will appear in the upper left corner of the screen.
- Press the L joystick once, the pixel block in the upper left corner will turn yellow, and you will enter touch interaction mode.
- Press and hold the right arrow key and drag with your right hand to select the area to be translated. After dragging, press the R joystick to send the translation request.
- If the network is normal, your computer command line will show that the request has been received. At this time, the computer browser visits http://127.0.0.1:1785, and you can see the game's TID and settings interface.Scroll to the bottom, the Source Language under Translation Settings is the original language of the text you need to translate;Target Language is the language you want to translate into;
-
- After setting, click Save Settings to save the configuration.
- Scroll to the top and click Recognize Text in the Text Recognition Results section to test the translation results. If the results are displayed normally, all debugging has passed.
- After that, return to Switch and press the L joystick to switch to interactive mode, hold down the right arrow key, drag with your right hand to select the area to be translated, press the R joystick to translate, and then press the L joystick again to switch back to game mode to play the game.
- If the translation area does not change, you only need to press the L joystick once each time to switch to interactive mode, press the R joystick to translate, and then press the L joystick again to switch back to game mode to play the game.
- To exit the translation plugin, in interactive mode, press the left arrow key.









