0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-23 16:22:58 +03:00

load translation in designer has been added

This commit is contained in:
Arin Alexander 2017-12-10 16:06:56 +03:00
parent e6929b0c0f
commit 67e64d8edc

View File

@ -1,9 +1,21 @@
#include <QApplication>
#include <LimeReport>
#include <QTranslator>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator limeReportTranslator;
QString translationPath = QApplication::applicationDirPath();
translationPath.append("/languages");
limeReportTranslator.load("limereport_"+QLocale::system().name(),translationPath);
a.installTranslator(&limeReportTranslator);
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),translationPath);
a.installTranslator(&qtTranslator);
LimeReport::ReportEngine report;
if (a.arguments().count()>1){
report.loadFromFile(a.arguments().at(1));