Results 1 to 6 of 6

Thread: Get user UI language

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Get user UI language

    Really? I tried it, but it returned a wrong language. The language returned was based on the location, but not on the UI language. Maybe I used a wrong method, I tried QLocale::system().name(). A user may live in Uzbekistan, but have a preferred language set to English, I need a function to return English in that case.

  2. #2
    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: Get user UI language

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Get user UI language

    Nope, I've already tried those things, but it again returns the language for location and doesn't care about the user settings. There is a link that may help to clear up what I mean: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx, but it is only for Windows.

  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: Get user UI language

    I understand what you mean but QLocale is the only thing Qt can offer you. You can try one more thing. Construct an empty QLocale object and query that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. 1.3.0 - UI Language
    By Asperamanca in forum Qt Tools
    Replies: 2
    Last Post: 16th December 2009, 11:19
  2. How modern is C++ language used in Qt's API?
    By piotr.dobrogost in forum Newbie
    Replies: 18
    Last Post: 31st May 2009, 03:44
  3. Replies: 2
    Last Post: 27th November 2008, 10:16
  4. language translation
    By thomasjoy in forum Qt Programming
    Replies: 2
    Last Post: 11th May 2007, 09:25
  5. 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

Tags for this Thread

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.