Hugo Locurcio bac1e69164 Use static typing in all demos (#1063) | hai 8 meses | |
---|---|---|
.. | ||
audio | hai 9 meses | |
fonts | hai 8 meses | |
images | hai 9 meses | |
screenshots | hai 9 meses | |
translations | hai 9 meses | |
README.md | hai 9 meses | |
icon.webp | hai 9 meses | |
icon.webp.import | hai 9 meses | |
project.godot | hai 8 meses | |
translation_csv.gd | hai 9 meses | |
translation_demo_csv.tscn | hai 8 meses | |
translation_demo_po.tscn | hai 8 meses | |
translation_po.gd | hai 8 meses |
This is a demo of how a project can be internationalized. Translations are created in a CSV file and then imported into Godot.
For correct display, the font used must contain the glyphs required by the
target language. See the fonts
folder for some fonts that you can use in your
project. Godot can load system fonts as a fallback, but this is not supported on
all platforms and the different visual design of system fonts can create
inconsistencies.
Godot allows internationalized text to change automatically when the locale is modified. Resources can also be set to internationalized alternatives and replaced automatically on locale change. This process is known as remapping.
Both CSV and gettext (PO/POT) approaches are showcased. Use the button in the bottom-right corner to switch between the two approaches.
The resouce remapping process with PO is the same with CSV. The in-game text translation process is also the same – use keys to fetch the appropriate translation.
The main difference between PO files and CSV files is the way both of them store
the translated data in their files. Have a look at the translations/po
and translations/csv
folders to see the files involved.
See Internationalizing games and Localization using gettext for more information.
Language: GDScript
Renderer: Compatibility