Results 1 to 6 of 6

Thread: menus with non-english language

  1. #1
    Join Date
    Feb 2007
    Posts
    42
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question menus with non-english language

    hi, i wanted to create a menu with options written in greek so i wrote something like this::

    Qt Code:
    1. anAction= new QAction("Επεξεργασία", this);
    2.  
    3. or
    4.  
    5. anAction= new QAction("Greek words...", this);
    To copy to clipboard, switch view to plain text mode 

    but when i tried to run the program the menu had rubbish....

    how can i fix this problem?
    Last edited by aegis; 31st March 2007 at 19:33. Reason: missing [code] tags

  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: menus with non-english language

    Start with reading article Internationalization with Qt.

    The preferred way is to do:
    Qt Code:
    1. anAction= new QAction(tr("Greek words..."), this);
    To copy to clipboard, switch view to plain text mode 
    and do the actual translation with the internationalization tools provided with Qt.
    J-P Nurmi

  3. #3
    Join Date
    Feb 2007
    Posts
    42
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: menus with non-english language

    ok i could do this,but doesn't evolve alot of extra work for someone that doesn't want to translate his application simply write it from the beginning into another language....

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: menus with non-english language

    Then this someone should use a proper encoding, set a codec or use proper QString methods that take input in the used encoding.

  5. #5
    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: menus with non-english language

    I have a feeling that using exotic letters might also cause problems for some compilers.
    J-P Nurmi

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: menus with non-english language

    Not speaking of two or more people modifying the same file and forgetting to use the same encoding... Lots of problems Qt is quite liberal here, for example gettext forbids using message keys in encodings different than latin1.

Similar Threads

  1. Discovery correct Language on all OS
    By patrik08 in forum Qt Programming
    Replies: 5
    Last Post: 25th February 2007, 19:27
  2. How can I add any other language
    By ethos0714 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 22nd February 2006, 02:51

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
  •  
Qt is a trademark of The Qt Company.