rsyncui/main.cpp

28 lines
765 B
C++

#include "mainwindow.h"
#include <QTranslator>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator myappTranslator;
QCoreApplication::setOrganizationName("RsyncUI");
QCoreApplication::setApplicationName("RsyncUI");
// Initialization of localization
QLocale localeName = QLocale::system();
QString localeDir = "/usr/share/locale/" + localeName.name() + "/LC_MESSAGES/"; //RsyncUI_" + localeName.name() + ".qm";
QString localeFilename = QCoreApplication::applicationName() + "_" + localeName.name();
QLocale locale = QLocale();
if (myappTranslator.load(localeFilename, localeDir))
{
a.installTranslator(&myappTranslator);
}
MainWindow w;
w.show();
return a.exec();
}