Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to have a translated installer with Qt Installer Framework?
Forum Updated to NodeBB v4.3 + New Features

How to have a translated installer with Qt Installer Framework?

Scheduled Pinned Locked Moved Solved Installation and Deployment
2 Posts 1 Posters 2.1k 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.
  • J Offline
    J Offline
    julia_f
    wrote on last edited by
    #1

    Hello all,

    I would like to create a multi-language installer with Qt Installer Framework.

    My goal is to have the same used language by the OS. I know that I must put qm files somewhere and modify a xml package like that :

    http://doc.qt.io/qtinstallerframework/ifw-customizing-installers.html#translating-pages

    http://doc.qt.io/qtinstallerframework/ifw-component-description.html

    My question is where to find generic qm files / how to generate them / where to put it. I wish have a translated installer for all Qt String not my custom Strings cuz I never add new Strings

    ps : I discovered that "windeployqt.exe" or "macdeployqt" exe generates a directory named "translations" with a lot of qm files : "qt_en.qm", "qt_es.qm", "qt_de.qm", "qt_fr.qm", ... I don't know if it's usefull

    ps2 : qm file formet is a binary file format not a xml file format or a text file format

    Thanks in advance

    1 Reply Last reply
    1
    • J Offline
      J Offline
      julia_f
      wrote on last edited by
      #2

      It works now!

      I added those lines in the "installscript.qs" file :

      Component.prototype.retranslateUi = function()
      {
          component.languageChanged();
      }
      

      and I added those in "config.xml" file :

      <Installer>
          ...
          <Translations>
              <Translation>fr.qm</Translation>
          </Translations>
      </Installer>
      
      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