diff options
Diffstat (limited to 'MultiMC.cpp')
-rw-r--r-- | MultiMC.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/MultiMC.cpp b/MultiMC.cpp index c93701b8..9cbf4947 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -3,6 +3,8 @@ #include <iostream> #include <QDir> #include <QNetworkAccessManager> +#include <QTranslator> +#include <QLibraryInfo> #include "gui/mainwindow.h" #include "logic/lists/InstanceList.h" @@ -224,10 +226,22 @@ int main(int argc, char *argv[]) // initialize Qt MultiMC app(argc, argv); + std::cout << "Loading Language File for " << QLocale::system().name().toLocal8Bit().constData() << "..." << std::endl; + + QTranslator qtTranslator; + qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + app.installTranslator(&qtTranslator); + + QTranslator mmcTranslator; + mmcTranslator.load("mmc_" + QLocale::system().name()); + app.installTranslator(&mmcTranslator); + // show main window MainWindow mainWin; mainWin.show(); + + switch(app.status()) { case MultiMC::Initialized: |