How to display chinese character in client?(Solved)

Added by StarsunYzL about 8 years ago

I had translate en.uxt into chinese, but the client can not display correctly, all of the chinese characters are display as a dot, and I also can not type or paste any chinese character in chat window.

Here is the en.uxt and screenshot of client:

http://rapidshare.com/files/407947671/en_uxt.zip.html

I only modify the 23947th line in en.uxt:

uiMk_system7 [退出]

How to display chinese character in client?

en_uxt.zip - en.uxt and screenshot of client (521.4 kB)


Replies (7)

RE: How to display chinese character in client? - Added by molator about 8 years ago

Here some tips.

In the server (not the client), language files are here :
.../code/ryzom/server/data_shard/language
It's text files.

All files are in UTF-16LE (little endian).
UTF-16 should be enough for chinese server side.

Each file ends with language code suffix.
For example : phrase_en.txt

To add a language (server side), you just have to clone the file and change the suffix.

To setup the client, you just have to change :
LanguageCode = "en";
in client_default.cfg
or add it in client.cfg with your own code.

The client will switch to your language but GUI translation is missing.

Now client side.
GUI translations are in :
.../data/gamedev.bnp
bnp files are pack files.
There's somewhere a tool to create them.
I don't know much about that.

If you open the file with a hexadecimal editor, you will see pieces of xml with english.

RE: How to display chinese character in client? - Added by molator about 8 years ago

Looks like gamedev.bnp xml parts are in ANSI.
So you can't use chinese.

RE: How to display chinese character in client? - Added by StarsunYzL about 8 years ago

@molator:

thanks for your post. now i only want to translate the client UI, .bnp files can be (un)compressed using bnp_make (in /code/nel/tools/misc).
i uncompress gamedev.bnp, translate en.uxt into chinese, then compress it into gamedev.bnp again, but the client can not display correctly.
Ryzom is support Unicode, en.ux file is also in UTF-8, so it should support chinese, i think i miss something, but i don't know what is it. :(

RE: How to display chinese character in client? - Added by kervala about 8 years ago

molator wrote:

Looks like gamedev.bnp xml parts are in ANSI.
So you can't use chinese.

They should be in ASCII (no character should be > 127) because you shouldn't put directly unicode characters in them.

You have to create/use ID from translation system and put unicode strings in .uxt files :)

All languages which are using an IME are not able to type complex text, because this is not yet supported by NeL (it was begun by Nevrax but not completed).

However, you can copy/paste complex characters. I tried with Chinese, Japanese, Korean and that's working fine.

You just need to use a font where these characters are defined.

Btw some fonts are not working correctly such as MS MingLiu.

RE: How to display chinese character in client? - Added by StarsunYzL about 8 years ago

@kervala:

thank you so much again! i replace ryzom.ttf with a chinese font, and it's working fine.

i can copy/paste chinese characters now, and client is display correctly, but i still can not type chinese characters, i think i must solve it myself.

thanks again, everyone.

(1-7/7)