1

I have a Qt application. There I use QColorDialog to pick a QColor and QFileDialog to read/save files. My specific terms I have translated into a individual myApp_DE.qm file (works fine except for this).

But the Qt specific dialogs, i.e. QColorDialog or QFileDialog

QColor color = QColorDialog::getColor(Qt::white, this, ui->label->text(),  QColorDialog::DontUseNativeDialog);

or

QString exportFileName = QFileDialog::getSaveFileName(this, tr("Export dialog"), QDir::homePath(), tr("To text file (*.txt)"));

is still in the initial language, whereas my myApp_DE.qm was translated properly.

How can I translate these Qt specific dialogs?

I have UbuntuStudio in german QLocale::system() returns "de_DE", but even in the system, some buttons say "Quit" (I guess no translation availble there?).

Lenin
  • 570
  • 16
  • 36
Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
  • Possible duplicate of [QFileDialog dynamic translation](http://stackoverflow.com/questions/22749267/qfiledialog-dynamic-translation) – demonplus Nov 03 '15 at 11:00
  • Are you loading Qt's own translation files as well as yours? – peppe Nov 03 '15 at 21:40
  • Hm on my Linux I do not see the german translation. But on a Windows machine, I see german dialog boxes for the ready to use file openener/saver. – Ralf Wickum Nov 04 '15 at 09:25
  • @peppe Yes.. all delivered *.qm files. – Ralf Wickum Nov 11 '15 at 07:51
  • Sorry, what do you mean by that? – peppe Nov 11 '15 at 10:21
  • Sorry, I mean I added all by Qt delivered german *.qm files assistant_de.qm, designer_de.qm, linguist_de.qm, myApp_de_DE.qm, qtbase_de.qm, qtconnectivity_de.qm, qt_de.qm, qtdeclarative_de.qm, qt_help_de.qm, qtlocation_de.qm, qtmultimedia_de.qm, qtquick1_de.qm, qtquickcontrols_de.qm, qtscript_de.qm, qtxmlpatterns_de.qm. – Ralf Wickum Nov 11 '15 at 10:50

0 Answers0