I have a QMessageBox
like this:
QMessageBox::question(this, tr(\"Sure want to quit?\"),
tr(\"Sure to quit?\"), QMessageBox::Yes | QMessageB
You can translate Text "Save" in this case to different language by clicking translatable check box as below.
Which language is depending on the locale you load when loading the application. You can do this as follows
QApplication app(argc, argv);
//loading my_translation_pt file
QString file= app.applicationDirPath() +"/my_translation_pt";
QTranslator translator;
translator.load(file);
//Setting the translator to the QApp
app.installTranslator(&translator);
sample my_translation_pt file is attached below
you can encode the tranlation using
c:\Qt\4.7.1\bin>lrelease.exe :\temp\my_translation_pt