From cf5ed56c943599c092a91933b45471c4c0e5d579 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Fri, 10 Jul 2020 11:04:49 +0200 Subject: Add support for internationalization - Resolves: #243 --- gui/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gui/main.cpp') diff --git a/gui/main.cpp b/gui/main.cpp index 670e664..73d55cc 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,10 @@ int main(int argc, char **argv) { if (!QSystemTrayIcon::isSystemTrayAvailable()) { qDebug() << "No systray icon available. Things might not work for now, sorry..."; } + + QTranslator translator; + translator.load(QLocale(), QLatin1String("main"), QLatin1String("_"), QLatin1String(":/i18n")); + app.installTranslator(&translator); app.setQuitOnLastWindowClosed(false); QQmlApplicationEngine engine; -- cgit v1.2.3