Are Chinese characters supported?

Started by FormosaFalanster, Wed 05/05/2021 10:05:50

Previous topic - Next topic

FormosaFalanster

The next game I do, I want to translate it in several languages, including Chinese (traditionnal characters). How would that work though? Is that supported? Anyone has experience with writings that are not in latin alphabet?

heltenjon

#1
Falcon City has Hakka-Chinese listed as one of the available languages.

Perhaps this thread may be of interest?

FormosaFalanster

Quote from: heltenjon on Wed 05/05/2021 11:14:23
Falcon City has Hakka-Chinese listed as one of the available languages.

Hakka uses Chinese characters like Mandarin so that could work. It's just a matter of, how does the fonts work, maybe?

Gilbert

Unless it's changed recently, short answer is: No.

AFAIK the current engine doesn't have support for multibyte character codes, so it can display at most 256 different symbols from a font set, you cannot just type Chinese text directly and expect it to work, even though the font itself may contain Chinese characters.

Unless the game uses at most 256 characters (in that case you have to cramp all the required symbols into the basic slots of the font file), which is very unlikely, so you need to use workarounds, like prerender all the required text into sprites, or use a module to display the symbols from a bitmap, or use a plugin like the one heltenjon linked to.


Crimson Wizard

#5
AGS still does not, that is in plans to change, but still not at the moment.

There's a plugin that allows you to display UTF8 texts, linked above by heltenjon - that is the only known working solution.
It has certain limitations, because some algorithms still rely on the AGS engine. One noteable case is text wrapping: because the engine does not know about UTF-8 it may screw up the text when breaking it into lines. This is resolved by adding extra spaces between words to give it some anchors where splitting is safe (I was told that normally Chinese does not have spaces).
There's more about it in the plugin's thread.
It's probably also may be improved by writing custom speech system and/or expanding the plugin with more functions.

FormosaFalanster

Okay, so if I understand well, it's possible but it's not straightforward!

Thanks guys, this is all I needed to know for the moment. The game is near completion so I was anticipating if it is even feasible at all. It seems it's worth translating it and then with a bit of work it can be put into the game.

So I may dedicate some time after the game is out to look into this other thread and the module, and as you said maybe work to improve it (which translates as: brace yourself for questions in the discord, but I promise I'll do my best alone).

I thought about pre-rendering the text in graphics and putting it in the game after. It's difficult especially with traditional Chinese because the characters are very intricate and that does not look good. In my previous game I tried to put an element of background with chinese writing on it and damn that was a headache.

But luckily, in this game I use custom GUIs all the time so it should help.

Anyway thanks, I'll keep you posted about the progress!

SMF spam blocked by CleanTalk