RetroArch includes an in-game translation service: at any time, a button combination pauses the game, captures the screen, runs text recognition (OCR — Optical Character Recognition) and displays the translated image over the game. At last you can understand your 100% Japanese games!
This feature requires an internet connection, a controller with a left analog stick, and works with libretro (RetroArch) cores only.
The service is enabled by default in Recalbox — nothing to configure to try it out:
HOTKEY + LEFT STICK DOWN.📷 Screenshot coming soon:
retroarch-ai-translation.png
By default the translation is displayed in image mode. RetroArch also offers a speech mode (the recognized text is read out loud): enable it with a RetroArch configuration override on the ai_service_mode key.
By default (auto), the target language is derived from your interface language, falling back to English. To force it, edit recalbox.conf:
global.translate.to=EN
The full list of allowed language codes (EN, ES, FR, IT, DE, JP…) is given as a comment in recalbox.conf, above the global.translate.* keys. You can also set the source language with global.translate.from (leaving auto is fine in most cases).
Translation is performed by a third-party online service: ztranslate.net. By default, Recalbox uses a shared key (RECALBOX): it works without any account.
Translation relies on a service external to Recalbox: availability, response time and quotas are not guaranteed, and the shared key is common to all Recalbox users. If translation stops responding or becomes slow, create your own (free) ztranslate account — see below.
API KEY is at the bottom of the page.; in front of the ;global.translate.apikey=RECALBOX line and replace RECALBOX with your key:global.translate.apikey=YourAPIKey
Another compatible translation service (or a personal API) can be called instead of ztranslate through the global.translate.url key: when set, it replaces the ztranslate call.
| Key | Default | Purpose |
|---|---|---|
global.translate |
1 |
enables (1) or disables (0) the service |
global.translate.from |
auto |
source language (the game's language) |
global.translate.to |
auto |
target language (auto = interface language, otherwise English) |
global.translate.apikey |
RECALBOX (commented out) |
ztranslate API key — the shared Recalbox key is used while the line stays commented |
global.translate.url |
(empty) | URL of an alternative translation service, used instead of ztranslate when set |
Nothing happens when I press HOTKEY + LEFT STICK DOWN? Check that the game runs on a RetroArch core, that your controller has a left analog stick, that your Recalbox is connected to the internet and that global.translate is not set to 0.
The translation shows up in the wrong language? Force the target language with global.translate.to=<code> in recalbox.conf (for example EN or FR).
Can I hear the text instead of reading it? Yes, with RetroArch's speech mode (ai_service_mode), through a configuration override.
Translation stopped responding? The online service may be overloaded or unavailable: try again later, or use your own ztranslate key.