Sería excelente que el mundo hablara solo un idioma (It would be great if the
world spoke only one language). Unfortunately for
us developers, that is not the case. While indie or niche games usually
do not need localization, games targeting a more massive market
often require localization. Godot offers many tools to make this process
more straightforward, so this tutorial is more like a collection of
tips and tricks.

Localization is usually done by specific studios hired for the job and,
despite the huge amount of software and file formats available for this,
the most common way to do localization to this day is still with
spreadsheets. The process of creating the spreadsheets and importing
them is already covered in the Importing translations tutorial,
so this one could be seen more like a follow-up to that one.

Some controls, such as Button and Label,
will automatically fetch a translation if their text matches a translation key.
For example, if a label’s text is “MAIN_SCREEN_GREETING1” and that key exists
in the current translation, then the text will automatically be translated.

In code, the Object.tr()
function can be used. This will just look up the text in the
translations and convert it if found:

The same text in different languages can vary greatly in length. For
this, make sure to read the tutorial on Size and anchors, as
dynamically adjusting control sizes may help.
Container can be useful, as well as the text wrapping
options available in Label.

The project name becomes the app name when exporting to different
operating systems and platforms. To specify the project name in more
than one language, create a new setting application/name in the Project
Settings and append the locale identifier to it.
For instance, for Spanish, this would be application/name_es: