View Full Version : embedded font/locale problems

3rd October 2007, 12:58
I'm trying to get a program to dynamically switch between English text and Chinese text on an embedded board running mobilinux 4.0, with QT4.3.0. I’ve had a look on the web but have not been able to find anything on this problem.

At the moment when I change the mode into Chinese, on the board it will display any English characters in the Chinese translation (from the ts/qm file) but any Chinese characters, even within the translated string, do not appear. We do not have gcc installed on the embedded board, and would prefer not to install it, so I am trying to run localedef with the arm settings to compile the settings on my PC, and then am transferring the files created in /usr/lib/locale/en_GB.utf-8 to the same place on the embedded board. They then appear when locale -a is run and appear to be set when I use export

LANG=en_GB.utf-8. However I am still not seeing any Chinese characters when the program is run. I have built the same program on the PC and it appears to work fine. Can you give me some advice how to set this up or what might be wrong?

I’ve read something about it should be en_GB.UTF-8 not lowercase, but this produces LC_ warnings. The only other thing is I’m not sure that the fonts or the locale is set up correctly on the embedded board but am not sure how to check this, and I’ve kind of run out of other things to try. I’ve also tried copying all the fonts from the PC into /usr/local/Trolltech/QtopiaCore-4.3.0-arm/lib/fonts but still the characters do not appear. The only other thing is although it is running on an install of 4.3.0 it was compiled with 4.3.1. I don’t know if this would cause a problem?It seems to run ok as I said, but it just won’t change the font.

3rd October 2007, 13:08
In short, you'll need to catch QEvent::LanguageChange and retranslate everything. Have you noticed this article in our wiki: Dynamic translation (http://wiki.qtcentre.org/index.php?title=Dynamic_translation)?

3rd October 2007, 14:01
Thanks I'll have a look at that. I'm not sure the problem is with the translation - if I use english strings in the translation it changes fine. It is only when I am trying to use chinese characters in the translation that I cannot see any of the chinese characters. And I cannot see it only on the embedded version. I have written the same program on the PC and it works fine. (in SUSE 10.2)


10th October 2007, 15:42
May be you dont have the necessary character files on your embedded device.I did the same project.Using dynamic translation file.You must find a unicode character file and put it to device.