Skip to content

Localization: Translating The Game

Jummit edited this page Apr 15, 2022 · 4 revisions

Adding Translatable Text

If you want text inside the game to be translatable, you can use the tr function like this:

var translated = tr("Untranslated text")

Many Control nodes like Labels, Buttons etc already translate their text automatically. One exception is RichTextLabel; for that you can use the TranslatableRichTextLabel. The bbcode is the text that will be translated.

Adding Translations

The translations are stored inside a csv file under res://localization/loca.csv. It is structured like this:

"keys","<LANG>"
English text,German Text

Changing The Source Text

If you find a typo or want to change some translatable text in the game, make sure to change it in the csv file as well!