summaryrefslogtreecommitdiffhomepage
path: root/gui/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/main.cpp')
-rw-r--r--gui/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/main.cpp b/gui/main.cpp
index 763f1cb5..de904f94 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -5,6 +5,8 @@
# include <QCoreApplication>
# include <QFile>
# include <QString>
+# include <QLocale>
+# include <QTranslator>
#endif
#include "migration/migration.hpp"
@@ -128,6 +130,8 @@ main(int argc, char** argv)
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
+
+ QTranslator t;
QApplication app(argc, argv);
set_qt_style();
@@ -137,6 +141,11 @@ main(int argc, char** argv)
add_win32_path();
#endif
+ // QLocale::setDefault(QLocale("pl_PL")); // force i18n for testing
+
+ (void) t.load(QLocale(), "", "", QCoreApplication::applicationDirPath() + "/i18n", ".qm");
+ (void) QCoreApplication::installTranslator(&t);
+
do
{
mem<MainWindow> w = std::make_shared<MainWindow>();