Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116613

Qt for webassembly doesn't use browser's locale for its QLocale::system()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7
    • 6.5.2
    • Core: Locales (i18n)
    • None
    • WebAssembly
    • 63fc3175b (dev)

    Description

      According to here:

      https://stackoverflow.com/a/31135571

      Browser's locale can be determined with navigator.languages api which will return an array of user's locales (from the most preferred to the least preferred).

      I have attached a small project that reproduces this issue.

      You may need to change your browser's locale for this to work, for instance in firefox I add the user language "Portuguese-Portugal" and then I move it to top to get it as the preferred locale afaik. navigator.languages then return pt-PT as the first element.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-116613
          # Subject Branch Project Status CR V

          Activity

            People

              sorvig Morten Sørvig
              qtuser32 Random Guy
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes