this post was submitted on 18 Oct 2023
4 points (100.0% liked)

Godot

5642 readers
306 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 1 year ago
MODERATORS
 

I'm following this tutorial for implementing translations into my game. While importing though, I get this block of error messages:

The csv I have in the file system contains this data:

and it uses UTF 16. It seems as if Godot expects a UTF 8 file for some reason, even though these files don't support speciala characters (which are used heavily in different languages). Does someone know what is going on here?

top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 10 months ago (1 children)

First, make sure you read: https://docs.godotengine.org/en/stable/tutorials/assets_pipeline/importing_translations.html#translation-format

You must save the file using UTF-8 and you're missing "keys" in the first column.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago) (2 children)

The top-left cell is ignored and can be left empty or having any content.

The "keys" thing doesn't seem to be necessary, but thank you, I'll read through it.

EDIT: How are we supposed to enter these special characters for different languages with UTF 8?

[–] Ogeon 2 points 10 months ago

Utf-8 is still Unicode and supports the same set of characters. Just encoded differently, with a variable amount of bytes per character. So, it should work, unless the software writing the file doesn't support it properly.

[–] [email protected] 1 points 10 months ago (1 children)

The "keys" thing doesn't seem to be necessary, but thank you, I'll read through it.

Yes, you are right, sorry i always put it just in case.

EDIT: How are we supposed to enter these special characters for different languages with UTF 8?

What languages are you talking about? Do you use specific characters that are not supported?

You could enter the unicode value of your characters in your UTF-8 translation file and then use a script to convert these values to UTF-16 or make your own tool / extension to add the feature. I don't know much in the unicode formatting area.

[–] [email protected] 1 points 10 months ago

I am talking about these characters: Ä Ö Ü È Ś and so on.

[–] [email protected] 1 points 10 months ago

Comments in the video you mentioned say that Godot 4 requires use of UTF-8 without BOM encoding.

What's missing in UTF-8 in your use case?

[–] FencerDevLog 1 points 10 months ago

Check out my tutorial. It demonstrates the correct structure of the csv file.