Is there a way to use the translations from qt library combined with that from user's application?
-
You need to deploy Qt modules translation files located in your Qt installation directory along with translation files of your app. See the documentation.
@Chris-Kawa After trying, I find it out.
EachQTranslatorcan only hold the translations itload()at last.
But oneQCoreApplicationcaninstallTranslator()for many times and use all of them for translating😂So, the solution is creating one
QTranslatorforQt, and one for your app, finally, install them all to your app. -
If your app has its own translation files(
myapp.ts) and it supplies aAbout Qtdialog viaQMessageBox::aboutQt(), then, the message shown byaboutQt()will not be translated!
What's the solution? Or there is no solution?You need to deploy Qt modules translation files located in your Qt installation directory along with translation files of your app. See the documentation.
-
You need to deploy Qt modules translation files located in your Qt installation directory along with translation files of your app. See the documentation.
@Chris-Kawa After trying, I find it out.
EachQTranslatorcan only hold the translations itload()at last.
But oneQCoreApplicationcaninstallTranslator()for many times and use all of them for translating😂So, the solution is creating one
QTranslatorforQt, and one for your app, finally, install them all to your app. -
S Sauntor has marked this topic as solved on
-
@Chris-Kawa After trying, I find it out.
EachQTranslatorcan only hold the translations itload()at last.
But oneQCoreApplicationcaninstallTranslator()for many times and use all of them for translating😂So, the solution is creating one
QTranslatorforQt, and one for your app, finally, install them all to your app.@Sauntor Or, like the documentation I linked suggests, merge all translations into one file using
lconvert.