How to do localization in Godot 4
Asked Answered
G

5

0

Hi everyone

Im new to Godot and game development and have never done localization before. I did some research and found that I can use csv or gettext for localization in Godot. The majority of tutorials I found was about using csv and very little info about using gettext.
Which method would be best for a small project and for someone new to localization?

Gasholder answered 21/11, 2023 at 13:27 Comment(0)
C
0

Start with CSV. Gettext is more complicated and requires more setup, but has more advanced features.

Convolute answered 21/11, 2023 at 14:36 Comment(0)
G
0

Is it difficult to maintain csv as the project grows?

Gasholder answered 21/11, 2023 at 15:6 Comment(0)
C
0

Gasholder No, you should maintain the CSV as a spreadsheet in Excel, GoogleSheets, or something like that. Then export as CSV when you want to update it. It's actually easier to maintain, but it doesn't allow the same level of specificity and nuance.

Convolute answered 21/11, 2023 at 19:5 Comment(0)
G
0

I'll go with csv then since my project wont have complex text. Thank you for your help.

Gasholder answered 21/11, 2023 at 20:15 Comment(0)
G
0

For anyone reading this in the future. If you get the following error and the .csv file has a red X as its icon in Godot then your csv file uses a delimiter other than a comma. Your delimiter must be a comma

editor/import/resource_importer_csv_translation.cpp:95 - Condition "line.size() <= 1" is true. Returning: ERR_PARSE_ERROR
Error importing 'res://Locale/Localization.csv'.

Gasholder answered 21/11, 2023 at 21:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.