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. Qt Installer Localization/Language
Forum Updated to NodeBB v4.3 + New Features

Qt Installer Localization/Language

Scheduled Pinned Locked Moved General and Desktop
11 Posts 6 Posters 6.3k Views 1 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.
  • P Offline
    P Offline
    piazera
    wrote on 25 Sept 2013, 14:27 last edited by
    #1

    Hi,

    I would like to create an installer with qt installer framework.
    It won't require too much interaction.
    I need to set the installer main language, and also, provide the user the ability to change it, given he will have to read and accept my app license.
    I couldn't find in details the documentation of how to localize my installer.
    I've looked for it in the Qt installer manual and the only thing I found was this brief description: http://qt-project.org/doc/qtinstallerframework-1.4/ifw-customizing-installers.html#translating-pages

    For the standard installer screens, should I build Qt Installer from code adding my locale translation file? (i.e. pt_br.ts)
    If so, how does it choose the the language, by system locale setting?
    Is it possible to run the installer in a language other then the system language?

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zorn
      wrote on 11 Feb 2014, 13:48 last edited by
      #2

      Hi,
      I have the same problem.
      I want to translate the installer in french.
      I don't found how to do that.
      I try to do what the manual say, but it doesn't work.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kiro
        wrote on 4 Aug 2014, 15:04 last edited by
        #3

        I have the same problem here. I can translate component strings in the package.xml files using e.g.
        @<Description xml:lang="de_de">Bla</Description>@

        but all other (standard) pages are not translated (I use QtIFW 1.5 on a german Windows 7). I tried calling lupdate/lrelease to create .ts files, but got only translations for custom script strings, not the whole pages. What I'm also not sure of is how to include the resulting .qm files into the installer?!

        Any info would be appreciated.

        A 1 Reply Last reply 18 Dec 2017, 13:17
        0
        • M Offline
          M Offline
          Marika
          wrote on 10 Feb 2015, 04:46 last edited by
          #4

          I have similar problem. I have successfully create .ts/.qm files for my app and by changing the system locale on my machine, i can see that these translations are automatically detected and used.

          I now want to localize the installer text.

          I see three paragraphs here http://doc.qt.io/qtinstallerframework/ifw-customizing-installers.html that tell me its possible but this gives no clue on how to generate the .ts files for translation. The fact that you use an en_en.ts to modify the existing text is intriguing.

          My specific questions are:

          1. upon which file to you run lupdate to create the .ts file(s) for the installer?
          2. is there only one .ts file per language, or many?
          3. is there a default location where the resultant .pm files should be saved?
          1 Reply Last reply
          0
          • M Offline
            M Offline
            Marika
            wrote on 10 Feb 2015, 04:46 last edited by
            #5

            I have similar problem. I have successfully create .ts/.qm files for my app and by changing the system locale on my machine, i can see that these translations are automatically detected and used.

            I now want to localize the installer text.

            I see three paragraphs here http://doc.qt.io/qtinstallerframework/ifw-customizing-installers.html that tell me its possible but this gives no clue on how to generate the .ts files for translation. The fact that you use an en_en.ts to modify the existing text is intriguing.

            My specific questions are:

            1. upon which file to you run lupdate to create the .ts file(s) for the installer?
            2. is there only one .ts file per language, or many?
            3. is there a default location where the resultant .pm files should be saved?
            1 Reply Last reply
            0
            • K Offline
              K Offline
              kiro
              wrote on 10 Feb 2015, 08:23 last edited by
              #6

              You should run lupdate on any file that could need translation. I find it best to run it on the package directories, so you have one .ts file per package. When translating .qs script texts, use the qsTr("..."); macro. Then, before bulding the installer, call e.g. "lrelease -nounfinished packages/com.company.yourpackage/meta/de_de.ts" to update the .qm files. The translations should then be compiled into the installer when binarycreator is called with the correkt package directory...
              I'm currently using QtIFW 1.6 atm and it works quite well. There's a pre-compiled version when you search (quite a bit) under downloads...

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kiro
                wrote on 10 Feb 2015, 08:23 last edited by
                #7

                You should run lupdate on any file that could need translation. I find it best to run it on the package directories, so you have one .ts file per package. When translating .qs script texts, use the qsTr("..."); macro. Then, before bulding the installer, call e.g. "lrelease -nounfinished packages/com.company.yourpackage/meta/de_de.ts" to update the .qm files. The translations should then be compiled into the installer when binarycreator is called with the correkt package directory...
                I'm currently using QtIFW 1.6 atm and it works quite well. There's a pre-compiled version when you search (quite a bit) under downloads...

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Marika
                  wrote on 11 Feb 2015, 05:54 last edited by
                  #8

                  Ok... this gets me a little further. So which installation files are translated? I only see one likely file in the meta folder and its called package.xml. This file doesn't seem to have much in it. Where is all the text that you see in the installer?
                  eg: "Please specify the folder where The App will be installed"

                  Also, if I'm not actually altering the default text, shouldn't there be Qt translations built in already?

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Marika
                    wrote on 11 Feb 2015, 05:54 last edited by
                    #9

                    Ok... this gets me a little further. So which installation files are translated? I only see one likely file in the meta folder and its called package.xml. This file doesn't seem to have much in it. Where is all the text that you see in the installer?
                    eg: "Please specify the folder where The App will be installed"

                    Also, if I'm not actually altering the default text, shouldn't there be Qt translations built in already?

                    1 Reply Last reply
                    0
                    • K kiro
                      4 Aug 2014, 15:04

                      I have the same problem here. I can translate component strings in the package.xml files using e.g.
                      @<Description xml:lang="de_de">Bla</Description>@

                      but all other (standard) pages are not translated (I use QtIFW 1.5 on a german Windows 7). I tried calling lupdate/lrelease to create .ts files, but got only translations for custom script strings, not the whole pages. What I'm also not sure of is how to include the resulting .qm files into the installer?!

                      Any info would be appreciated.

                      A Offline
                      A Offline
                      Alexey Kozyrev
                      wrote on 18 Dec 2017, 13:17 last edited by
                      #10

                      @kiro
                      To localize the Description, use
                      @<Description xml:lang="de">Bla</Description>@
                      To localize the DisplayName, use
                      @<DisplayName xml:lang="de_DE">Bla</DisplayName>@
                      for me it worked on IFW 3.0

                      1 Reply Last reply
                      1
                      • L Offline
                        L Offline
                        liye0005
                        wrote on 23 Nov 2018, 10:29 last edited by
                        #11

                        I have the same problem when i use the latest version QtIFW 3.0.6. I want to change the english to chinese. Anyone has any ideas?!0_1542968932287_20181123182634.png

                        1 Reply Last reply
                        0

                        • Login

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