Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Missing Translations for Standard Buttons in QtQucikControls2

    QML and Qt Quick
    2
    4
    154
    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.
    • S
      sandro4912 last edited by

      I want to translate my application to german english and spanish.

      So far so good I could provide translations with all the strings i marked for translations. However I realized that some standard buttons do not get translated.

      For Example:

      Dialog {
      //...
          standardButtons: Dialog.Close
      }
      

      That standard button always shows "close" in each language.

      Now what I understand under

      "/home/sandro/Qt/5.15.0/gcc_64/translations/"
      

      I can find translation files for qtquickcontrols2. However only en is available not ge and es:

      fbb11ce5-e277-4488-af28-cf75320027d3-image.png

      Do I copy these files into my ressource file were my own translations are located and load them with a second QTranslator ?

      If the translation files does not exist for my language how to I generate a empty file to fill (for example an empty espanol?

      Im a bit confused about this topic. I could not find good answers in the docs.

      sierdzio 1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators @sandro4912 last edited by

        @sandro4912 said in Missing Translations for Standard Buttons in QtQucikControls2:

        Do I copy these files into my ressource file were my own translations are located and load them with a second QTranslator ?

        Yes.

        If the translation files does not exist for my language how to I generate a empty file to fill (for example an empty espanol?

        I don't know, but you can try to download source code (for example from here: http://download.qt.io/archive/qt/5.15/5.15.1/single/) and run lupdate on the .pro file there, maybe it will work...

        Actually there is the qttranslations folder in sources, looks like it contains all the TS files. So it seems like a good place to start.

        You may need to run configure on the source code first, to prepare qmake stash etc. Not sure if it is necessary in this case.

        Im a bit confused about this topic. I could not find good answers in the docs.

        (Z(:^

        1 Reply Last reply Reply Quote 1
        • S
          sandro4912 last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • S
            sandro4912 last edited by sandro4912

            I found this link useful.

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