Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.1, 5.11.1
-
None
-
Device creation Raspberry Pi 3
Description
Whereas the sample code included in the Qt documentation for Internationalization works well in Linux Desktop (Debian at least), it doesn't work when using the Boot2Qt Raspberry Pi 3 installation. Custom .qm translation files are successfully loaded and used but, it doesn't take effect for .qm system files for every language. For example:
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&qtTranslator);
The qt_XX.qm files are located and loaded with no errors but they are not used correctly in GUI (QDialogButtonBox buttons, QFileDialog, ...). The 'Yes', 'No', 'Ok', 'Cancel' or 'Open' texts are not translated.
Workaround: Copy the files qtquick1_XX.qm and qtscript_XX.qm from the Linux Desktop Qt translations folder to the Raspberry Pi Qt translations folder (/usr/share/translations/).
I can't tell if this is a bug for later or earlier versions to 5.9.1 or for other platforms.