Language problem - How to localize a game?

Sup, guys!
I’m using defold with a framework platformer creation klit. When I write dialoges in .lua files they appear only in English and I want to use some other language. Can you please help me to make it possible?

Defold doesn’t provide a built in system for language localization. There’s many solutions and it really depends on the amount of text you have, if it’s mainly labels in game objects or gui nodes, different fonts etc.

I have one simple example of how to deal with language localization here: https://github.com/britzl/publicexamples/tree/master/examples/localization

I can recommend https://poeditor.com/ which is a great tool for localising text and exporting it to flexible fileformats. It has a great API to automate everything and it works fine with Defold.

I don’t need localization, just change blie text to Russian language so it appears in a game (for now I have empty space when it’s Russian and ok when it’s English).

I’m sure your links are great, but they are for coders and I’m just using a tool to make a simple game with texts and need some fix to enable Russian here. If it’s real, it would be great if you give me a tip :smiley:

You should add Russian characters into the font that you use to display the texts. It’s a bitmap font, by default only English characters are rendered.

Yep, I found it and it has russian caracters and framework files use exactly that font, do I don’t know why it doesn’t work.

Yes, this is most likely it if nothing shows when you use strings containing Russian. A font will by default include the standard ASCII character set. There’s a field where you can define additional characters such as currency signs or language specific characters. For Cyrillic and others you need to check the all_chars checkbox. Read more in the Font manual.

1 Like

That font had Russian characters, also I tried to replace font with some others which have those caracters and no result.

And if you create a text node or a label and assign it the font and hard code some Russian characters into the text field does the characters show or not?

Also unable to add Cyrillic glyphs.

After adding some text in “Extra Characters” field, there are no glyphs added to bitmap font:

When checking “All Chars” checkbox - some additional glyphs appears in bitmap font, but they are useless for me:

I’ve tryed some different fonts in *.ttf and *.otf formats, and double checked, that all of them actually contain Cyrillic glyphs.

I think, that it’s somehow related to codepages. Can we actually use utf-8 like scheme, to get more than 256 bitmap glyphs from our font?

Just in case, here are some cyrillic text to copy-paste for testing: “БЭЙДЖбэйдж”

The glyphs won’t show up in the preview but should show up if the use the font in the GUI text nodes or labels.

2 Likes

That’s true when you use glyphs in the GUI text nodes, they appear normal and can be seen in the editor, as well as in game after build. So, it seems like a minor bug in font preview only.
Thank you.

2 Likes