Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTranslator: QMessageBox strings not translating...

QTranslator: QMessageBox strings not translating...

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 789 Views 1 Watching
  • 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.
  • D Offline
    D Offline
    delt
    wrote on last edited by delt
    #1

    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!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      delt
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved