Important: Please read the Qt Code of Conduct -

QTranslator: QMessageBox strings not translating...

  • Hello everyone,

    After a successful call to QTranslator::load () and a call to QApplication::installTranslator (), what else do i need to do so that QMessageBox strings get translated? (the yes/no buttons, etc.)

    I converted qtbase_fr.ts (about 220kb) to a .qm file and loaded that into a QTranslator object, then used installTranslator to "link" the translator into my QApplication. The load function returns true indicating that loading was successful, but installTranslator is a void function so there's no way to check if it succeeded.

    Thanks for any help!

  • Solved. Or rather worked around. I simply wrote my own ask yes/no function that sets the button text manually.

    The weird thing is that the load/save dialogs (QFileDialog) translate to the LC_ALL locale even if i don't use a QTranslator, but QMessageBox doesn't.

Log in to reply