Results 1 to 4 of 4

Thread: embedded font/locale problems

  1. #1
    Join Date
    Sep 2007
    Posts
    3

    Default embedded font/locale problems

    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.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: embedded font/locale problems

    In short, you'll need to catch QEvent::LanguageChange and retranslate everything. Have you noticed this article in our wiki: Dynamic translation?
    J-P Nurmi

  3. #3
    Join Date
    Sep 2007
    Posts
    3

    Default Re: embedded font/locale problems

    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)

    Thanks

  4. #4
    Join Date
    Jul 2007
    Posts
    104
    Thanks
    22
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: embedded font/locale problems

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.