Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Possible mistake in the translation example?
Qt 6.11 is out! See what's new in the release blog

Possible mistake in the translation example?

Scheduled Pinned Locked Moved Unsolved Qt for Python
7 Posts 4 Posters 448 Views 3 Watching
  • 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.
  • A Offline
    A Offline
    axu2
    wrote last edited by axu2
    #1

    Hi, I was looking at this example:

    https://doc.qt.io/qtforpython-6.8/tutorials/basictutorial/translations.html

    It didn't work for me. It always showed English. But after a little research I found this other example:

    https://github.com/fernicar/PySide6_Examples_Doc_2025_v6.9.1/blob/6.9.1/examples/widgets/linguist/README.md

    And basically I just needed to change

    LANG=de python main.py

    to

    LANG=de_DE.UTF-8 python main.py

    Is this a mistake or is pyside behaving unexpectedly? I'm specifically using pyside 6.9.3 on macOS 15 with Python 3.11

    To be clear, changing it fixed the problem.

    edit:

    Also just tried Python 3.14 with Pyside 6.11.2, same problem. Just changing the LANG fixes it.

    1 Reply Last reply
    1
    • F Offline
      F Offline
      friedemannkleint
      wrote last edited by friedemannkleint
      #2

      It probably depends on the OS; LANG=de works on Kubuntu Linux. But giving the encoding might be better. LC_ALL can also be used...

      We will change the tutorial accordingly.

      SGaistS 1 Reply Last reply
      0
      • F friedemannkleint

        It probably depends on the OS; LANG=de works on Kubuntu Linux. But giving the encoding might be better. LC_ALL can also be used...

        We will change the tutorial accordingly.

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote last edited by
        #3

        @friedemannkleint Anything more than updating the LANG part ? If not I have the change ready to be submitted. Otherwise I am happy to improve on it.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • F Offline
          F Offline
          friedemannkleint
          wrote last edited by
          #4

          https://codereview.qt-project.org/c/pyside/pyside-setup/+/770427 ?

          SGaistS 1 Reply Last reply
          0
          • F friedemannkleint

            https://codereview.qt-project.org/c/pyside/pyside-setup/+/770427 ?

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote last edited by
            #5

            @friedemannkleint said in Possible mistake in the translation example?:

            https://codereview.qt-project.org/c/pyside/pyside-setup/+/770427 ?

            Nice ! Thanks

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • A Offline
              A Offline
              axu2
              wrote last edited by
              #6

              The website still isn't updated?

              JKSHJ 1 Reply Last reply
              0
              • A axu2

                The website still isn't updated?

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote last edited by
                #7

                @axu2 said in Possible mistake in the translation example?:

                The website still isn't updated?

                The website shows the official documentation of the current release. It will update with the next release.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                2

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt
                • Unsolved