Qt Installer Localization/Language
-
wrote on 25 Sept 2013, 14:27 last edited by
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-pagesFor 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? -
wrote on 11 Feb 2014, 13:48 last edited by
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. -
wrote on 4 Aug 2014, 15:04 last edited by
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.
-
wrote on 10 Feb 2015, 04:46 last edited by
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:
- upon which file to you run lupdate to create the .ts file(s) for the installer?
- is there only one .ts file per language, or many?
- is there a default location where the resultant .pm files should be saved?
-
wrote on 10 Feb 2015, 04:46 last edited by
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:
- upon which file to you run lupdate to create the .ts file(s) for the installer?
- is there only one .ts file per language, or many?
- is there a default location where the resultant .pm files should be saved?
-
wrote on 10 Feb 2015, 08:23 last edited by
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... -
wrote on 10 Feb 2015, 08:23 last edited by
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... -
wrote on 11 Feb 2015, 05:54 last edited by
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?
-
wrote on 11 Feb 2015, 05:54 last edited by
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?
-
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.
wrote on 18 Dec 2017, 13:17 last edited by@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 -
wrote on 23 Nov 2018, 10:29 last edited by