Localization

Hello,

coming from Godot, there was an easy native way to implement localization; I could create a csv with a key column, and a column for each of the language values, and after activating the localization feature, I simply could use the key for every text/label in the game, und it would change automatically to the right language value.

It seems defold has no native implementation for localization, and I don’t want to use modules created by third parties. So, my plan would now be to code this behaviour myself:
-read the csv
-get a text/labels key
-switch value

Has anybody done this? Is there maybe an easier way? I ideally want this behaviour to be somewhat centralized (separate script?), to be able to call it easily from anywhere…

Also, are there plans from defold to maybe implement a localization feature in the future? For game distribution to multiple this would be really helpful.

Kind regards.

Yes, others have done exactly what you describe, but probably using json instead of csv. Some have also shared their results as self-contained and reusable Lua modules. This is a popular one:

There are good modules which solve the problem. We will most likely never add this functionality to the Defold core.

Why?

(see Low Level Building Blocks section)

3 Likes

Hi,

thank you for the quick reply and clarification.

I managed to get it done. :slight_smile:

Appreciate keeping the engine focused. :heart: