You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
#include <QApplication>
#include <QTranslator>
#include <QLocale>
#include "sender.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
bool englishLanguageSelected=false;
// if there is command line parameter that sets the language, show UI in that language
QTranslator translator;
QStringList params = QCoreApplication::arguments();
QString currentparam;
for (int i = 0; i < params.size(); ++i){
currentparam=params.at(i).toLower();
if( currentparam=="--lang=en"){
translator.load(QString("senderi_") + "en");
app.installTranslator(&translator);
englishLanguageSelected=true;
}
}
if(!englishLanguageSelected){
QLocale::setDefault(QLocale(QLocale::Finnish,QLocale::Finland));
}
Sender sender;
sender.show();
return sender.exec();
}
You must log in to comment.