Text display problem (accents)

Started by Peegee, Sat 08/06/2024 09:05:42

Previous topic - Next topic

Peegee

Hello. Here is a strange problem, programmers who help me have not yet found the answer. I put icons in the first page of the game to change the language directly, without going into the setup.

Code: ags
Game.ChangeTranslation("English");

It works, except that the texts have a problem of accents that they did not have in game default. We see the accent but more the letter below. And in the case of zone names in the game, it is replaced by rectangles.

Khris

Just to be clear: are you saying these display issues don't happen when you change the language via winsetup?

Alan v.Drake

Broken accents means encoding issues. Make sure the traslation file has the same encoding as specified in the metadata parameter "Encoding" (it can be either ASCII or UTF-8)


- Alan

Peegee

Khris - In fact I cannot know if the problem is the same currently when we change the language in winsetup, because we put code to force the French language to start. Because the animations (different depending on the language) were no longer played in Game default.
But before that, I had the same problem by changing the language in the game, it worked in game default, and not by changing the language.

Alan - I tried both formats in General settings/Text format. Is there another place to change that?

Peegee

I think I found the solution, we had to redo all the rooms script. I realized that the problem was not happening on the levels I was working on. To check on the whole game.
Thanks to both of you.

Peegee

While checking, I still have the problems of accents on the names of the zones by pointing to them...

eri0o

Which AGS version?

Is your game UTF-8 or ASCII? Same question for translations?


Are your fonts compatible - either are your fonts UTF-8 or ASCII?

Crimson Wizard

#7
To be honest, reading everything that Peegee said, I still do not understand what the exact problem is.

English language does not have "accented" letters, and it is the only language that works always, regarding of encoding (because all of its letters are within first 128 characters). Therefore, the issue cannot be that encoding is wrong with that language.

So the issue is with French language instead?
Or perhaps the problem is that they don't switch some assets when changing translations?

@Peegee, could you please clarify which language do you have problems with?
Would you be able to post some screenshots or record a video of a problem? this may make it easier to understand what happens in your game.
Could your programmers also participate in this conversation, maybe they will be able to explain the problem in technical terms?

Peegee

In fact the problem is solved.

Using the language change in the game has resulted in poor display of accent letters. (the English version is not yet done, I was testing it with the French text). Rerun each script room has fixed the problem.
And the problem has spread in the properties of objects, hotspots and characters, I have to change them case by case.

Crimson Wizard

Alright, I understand now, so when you change to English language, some texts are not yet translated and still display in French, and they were displayed wrong.

It sounds like you are either using ANSI text mode, or a font that does not have all the necessary letters for all languages. If you were using Unicode text mode, and a more universal font, then you would not need to fix anything at all (I suppose).

SMF spam blocked by CleanTalk