diff options
author | Ruben Pollan <meskio@sindominio.net> | 2020-07-10 11:04:49 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2020-07-28 13:44:58 +0200 |
commit | cf5ed56c943599c092a91933b45471c4c0e5d579 (patch) | |
tree | c2a4f1ce4cffff3dce4c207575d15aa2a43c365f /gui/main.cpp | |
parent | cdb42f0d6b47a60ceb647e3ac6a6ce66352dbae4 (diff) |
Add support for internationalization
- Resolves: #243
Diffstat (limited to 'gui/main.cpp')
-rw-r--r-- | gui/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 <QApplication> #include <QSystemTrayIcon> #include <QTimer> +#include <QTranslator> #include <QtQml> #include <QQmlApplicationEngine> #include <QQuickWindow> @@ -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; |