30 QString locale = QLocale::system().name();
31 QString program = application.applicationFilePath();
32 program.remove( QRegExp(
"/.*/" ) );
34 QTranslator translator1;
35 translator1.load( program +
"_" + locale );
36 application.installTranslator( &translator1 );
38 QTranslator translator2;
39 translator2.load( QString(
"us_gui_" ) + locale );
40 application.installTranslator( &translator2 );
42 QTranslator translator3;
43 translator3.load( QString(
"us_utils_" ) + locale );
44 application.installTranslator( &translator3 );
46 QTranslator translator4;
47 translator3.load( QString(
"us_db_" ) + locale );
48 application.installTranslator( &translator4 );
58 QPushButton* cancel = mBox.addButton( QMessageBox::Cancel );
59 QPushButton* Register = mBox.addButton( qApp->translate(
"UltraScan",
"Register"),
60 QMessageBox::ActionRole);
62 mBox.setDefaultButton( Register );
63 mBox.setWindowTitle ( qApp->translate(
"UltraScan",
"UltraScan License Problem" ) );
64 mBox.setText ( ErrorMessage );
65 mBox.setIcon ( QMessageBox::Critical );
68 if ( mBox.clickedButton() == cancel ) exit( -1 );
72 return application.exec();