Skip to content
  • 0 Votes
    5 Posts
    3k Views
    M

    Such as ColorDialog, how to switch the language of the dialog that are available in the Qt is as follows .
    Page that was in reference

    #include <QApplication> #include <QTranslator> #include <QLibraryInfo> int main(int argc, char *argv[]) { //1 : Get the language setting of the system QTranslator qtTranslator; qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); QApplication a(argc, argv); //2 : Installation of language setting a.installTranslator(&qtTranslator); return a.exec(); }
  • 0 Votes
    3 Posts
    4k Views
    K

    @SGaist

    Yes, you are right. Was not really obvious to me.

    Here is an updated version of the config.xml of the online example of installer framework

    <?xml version="1.0" encoding="UTF-8"?> <Installer> <Name>Online Installer Example</Name> <Version>1.0.0</Version> <Title>Online Installer Example</Title> <Publisher>The Qt Company</Publisher> <!-- Directory name is used in component.xml --> <StartMenuDir>Qt IFW Examples</StartMenuDir> <TargetDir>@HomeDir@/IfwExamples/online</TargetDir> <!-- Change required to have English as startup language e.g. when you have an OS with German as standard language --> <Translations> <Translation>en.qm</Translation> </Translations> <!-- End of change for translation --> <RemoteRepositories> <Repository> <Url>http://localhost/repository</Url> </Repository> </RemoteRepositories> </Installer>

    The installer starts then with all text in English. Tested on Windows 7 64bit with German as local language.