Results 1 to 5 of 5

Thread: How to use Qt Linguist for Any other language translation?

  1. #1
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question How to use Qt Linguist for Any other language translation?

    Hi All,

    In my application I wanted to change the language as per the user preference. ie nothing but if the user can select any regional language accordingly the application should load the language dynamically.
    I went thru the Qt Linguist in that I couldn't get the languages like Hindi, Tamil and etc., Because these are all has different script(written strokes).
    Could any help me in this regard....
    Thanks a lot in advance..........
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to use Qt Linguist for Any other language translation?

    I use QTranslator and QSettings for this.

    Qt Code:
    1. QSettings settings;
    2. QTranslator translator;
    3.  
    4. switch (settings.value("appearance/language").toInt()) {
    5. case QLocale::Russian:
    6. translator.load(QString(":myproj_ru"));
    7. break;
    8. case QLocale::English:
    9. default:
    10. translator.load(QString(":myproj_en"));
    11.  
    12. }
    To copy to clipboard, switch view to plain text mode 

    Well, i have to rerun my app after i change language settings in my options dialog =(... but it is ok for me.
    I'm a rebel in the S.D.G.

  3. #3
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to use Qt Linguist for Any other language translation?

    Thanks buddy,

    But my questions are

    How to get the other language support in Qt Linguist which is not available in Qt Phrase Book? (Like Arabic, Hindi languages).

    Where to keep the " *.ttf " font file to use in Qt Linguist.?

    Thanks in Advance...

    Note:
    I'm using Qt4 in Linux.
    Last edited by Cutey; 5th February 2009 at 05:56. Reason: reformatted to look better
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  4. #4
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem in changing the language using Qt Linguist...?

    Dear All,

    Can any one help me to change the language of an application in the runtime.
    Because I'm working in an application like mobile device, in that let the user can change the language of the application without restarting the device.
    I hope it is possible but couldn't make it out. So any one help me to crack the problem.
    Thanks a lot in advance...
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  5. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to use Qt Linguist for Any other language translation?


Similar Threads

  1. language translation
    By thomasjoy in forum Qt Programming
    Replies: 2
    Last Post: 11th May 2007, 09:25

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.