Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QLocale detects system language incorrectly on Windows with language pack installed

    General and Desktop
    2
    4
    1159
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Violet Giraffe last edited by

      I am attempting to detect current system language with QLocale:
      @QLocale::Language sysLangId = QLocale::system().language();@

      However, it's not working correctly. I'm on Russian Windows 7 with English language pack applied, but language() returns Russian instead of English. Is there any workaround?

      1 Reply Last reply Reply Quote 0
      • H
        hardcodes.de last edited by

        Maybe
        @QStringList QLocale::uiLanguages() const@

        works for you.
        I think the Qt developers have problems with that, too. At least with their installers.

        while(!sleep){++sheep;}

        1 Reply Last reply Reply Quote 0
        • V
          Violet Giraffe last edited by

          I thought it will list all the languages registered in my system, i. e. Russian and English in my case. Will try, thanks.

          1 Reply Last reply Reply Quote 0
          • H
            hardcodes.de last edited by

            Yes but the docs say they are prioritized. I hope(d) that would bring up English in your case.

            while(!sleep){++sheep;}

            1 Reply Last reply Reply Quote 0
            • First post
              Last post