Runtime Language Switching in Ren'Py Translation Catalogs
Use Ren'Py translate statements and .tab catalog files to switch visual novel languages at runtime without duplicating scripts.
29 Nov 2026, 20:27 UTC

The problem: one script, many languages
You are building a visual novel in Ren'Py and need it to ship in English and Spanish. Copying every script file for each language quickly becomes unmaintainable: a typo fix requires editing many copies, and dialogue changes fall out of sync. You also want players to change language from the options menu without restarting the game.
The useful takeaway is to keep one set of scripts and mark translatable strings with Ren'Py's translate statement. Store replacements in .tab catalog files, then switch languages at runtime by setting config.language. Ren'Py loads the catalog matching the active language and substitutes strings automatically.
How translate statements and catalog files work
A translate statement gives a source string an identifier. Ren'Py looks up that identifier in the catalog for the current language. If a match exists, the translated text appears; if not, Ren'Py shows the original source text.
Catalog files live in the game directory, typically as en.tab, es.tab, and so on. Each line pairs a source string with its translation, separated by a tab character. Ren'Py selects the file that matches config.language when the game starts or when the language changes.
Worked example: English and Spanish catalogs
In script.rpy, mark dialogue for translation:
label start:
"Welcome to the castle." translate welcome_msg
"Would you like to change language?" translate ask_lang
menu:
"Switch to Spanish":
$ config.language = "es"
jump start
"Switch to English":
$ config.language = "en"
jump start
Create game/en.tab:
Welcome to the castle. Welcome to the castle.
Would you like to change language? Would you like to change language?
Create game/es.tab:
Welcome to the castle. Bienvenido al castillo.
Would you like to change language? ¿Quieres cambiar el idioma?
Where to run: edit these files in your Ren'Py project directory using any text editor. Required permissions: write access to the game/ folder. Encoding: save as UTF-8 without a byte-order mark.
To verify, launch the project through the Ren'Py Launcher, choose Spanish from the in-game menu, and confirm the dialogue text changes to Spanish without restarting. Then switch back to English and confirm it reverts. If a string appears in English while Spanish is active, that entry is missing from es.tab.
Limitations and practical checks
- Missing catalog entries fall back to the source text, which can expose untranslated strings mid-game.
- Changing
config.languagedoes not translate text that has already been displayed in the dialogue history or text log. - Syntax errors or encoding problems in a
.tabfile can cause Ren'Py to fall back to the default language or raise an error at runtime.
Practical check: after adding a new translatable string, open each language catalog and confirm the source string appears exactly as written in the script. Even a trailing space or curly-quote mismatch will prevent a match.
Closing
Start with two languages and a single menu option that toggles config.language. Verify that every marked string appears in both catalogs before adding a third locale. This keeps your scripts in one place while letting players switch languages at runtime.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.