Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. problem to translate my App
Qt 6.11 is out! See what's new in the release blog

problem to translate my App

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 469 Views 2 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.
  • Z Offline
    Z Offline
    Zunneh
    wrote on last edited by
    #1

    Hello everybody,
    i made a little app with QtDesigner and i wanted to translate it in french with QtLinguist,
    i follow all the steps :

    • Adding the ts files in my_project.pro.
    • Generate the ts file with l update.
    • I translated my app using QtLinguist.
    • I generate my fr.qm file with lrelease ,
      i'm sure all the steps are correct, when i try to translate my app, the file is loaded but i always see the defaut Text ( english )

    2d743137-124a-4672-ba1b-cffe0b6caa4c-image.png

    i need your help, thanks

    my english is average, please use simple words and try to be the most explicit, thank you

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Did you actually translate something with qt linguist?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      Z 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        Did you actually translate something with qt linguist?

        Z Offline
        Z Offline
        Zunneh
        wrote on last edited by Zunneh
        #3

        @Christian-Ehrlicher Yes of course, here is my qm File

        d394e63e-8fae-4d8b-86a1-4bc44a3391dd-image.png

        1b25aafe-072b-4409-9541-3f8fa59fc984-image.png

        my english is average, please use simple words and try to be the most explicit, thank you

        Pablo J. RoginaP 1 Reply Last reply
        0
        • Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Zunneh said in problem to translate my App:

          my qm File

          You meant ts-file. And did you run lrelease afterwards?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          Z 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            @Zunneh said in problem to translate my App:

            my qm File

            You meant ts-file. And did you run lrelease afterwards?

            Z Offline
            Z Offline
            Zunneh
            wrote on last edited by
            #5

            @Christian-Ehrlicher
            Yes the first generate the ts, opening Qt Linguist then after saving the changes i generated the qm from Qt

            my english is average, please use simple words and try to be the most explicit, thank you

            1 Reply Last reply
            0
            • Z Zunneh

              @Christian-Ehrlicher Yes of course, here is my qm File

              d394e63e-8fae-4d8b-86a1-4bc44a3391dd-image.png

              1b25aafe-072b-4409-9541-3f8fa59fc984-image.png

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @Zunneh it looks like the problem is widget creation order...

              From QTranslator class documentation:

              Note that the translator must be created before the application's widgets.

              And your MainWindow object w is just before the QTranslator object t :-(

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              Z 1 Reply Last reply
              3
              • Pablo J. RoginaP Pablo J. Rogina

                @Zunneh it looks like the problem is widget creation order...

                From QTranslator class documentation:

                Note that the translator must be created before the application's widgets.

                And your MainWindow object w is just before the QTranslator object t :-(

                Z Offline
                Z Offline
                Zunneh
                wrote on last edited by
                #7

                @Pablo-J-Rogina Thank you you resolve my probem :)

                my english is average, please use simple words and try to be the most explicit, thank you

                1 Reply Last reply
                1

                • Login

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