Qt localization: loading the localizable string probelm <p>I want to load the localized string in a Qt application. For this, I am following a few steps. Correct me if I am wrong.</p> <p>Note: it works fine for <code>QString</code> but not for <code>const char*</code></p> <ol> <li><p>Update the pro file with translation language</p></li> <li><p>Generate <code>.ts</code> &amp; edit using Qt linguist. Generate <code>.qm</code> file using lupdate and lrelease.</p></li> <li><p>Load the .qm file from a particular location.</p></li> </ol> <p>Here is how my <code>const char*</code> looks:</p> <pre><code>const char* sayHello = QT_TRANSLATE_NOOP("FriendlyConversation","hello"); LocalizationWithQT::LocalizationWithQT(QWidget *parent) : QMainWindow(parent) { //ui.setupUi(this); QString str = tr("say hello"); QPushButton *pushbutton = new QPushButton(tr(sayHello)); setCentralWidget(pushbutton) } </code></pre> <p>And here's how I am loading the .qm file:</p> <pre><code>QApplication a(argc, argv); QTranslator translator; bool val = translator.load("c:\\Data\\test\\hellotr_la"); a.installTranslator(&amp;translator); LocalizationWithQT w; w.showMaximized(); return a.exec(); </code></pre> <p>The problem is, if I provide any alternate Latin string to "sayhello", it's not loading at all. </p> <p>I have no idea where the mistake is.</p>