Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Solved How to have a translated installer with Qt Installer Framework?

    Installation and Deployment
    1
    2
    1797
    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.
    • J
      julia_f last edited by

      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 Reply Quote 1
      • J
        julia_f last edited by

        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 Reply Quote 0
        • First post
          Last post