From 384fe7067ec6628ff4e09bc8f75cc3a4a69a1d29 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Mon, 29 May 2017 19:09:12 +0300 Subject: Set up translations --- src/main.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main.cc') diff --git a/src/main.cc b/src/main.cc index 993eea82..e6d4c4e7 100644 --- a/src/main.cc +++ b/src/main.cc @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include "MainWindow.h" @@ -44,6 +46,16 @@ int main(int argc, char *argv[]) QFont font("Open Sans"); app.setFont(font); + QString lang = QLocale::system().name(); + + QTranslator qtTranslator; + qtTranslator.load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + app.installTranslator(&qtTranslator); + + QTranslator appTranslator; + appTranslator.load("nheko_" + lang, ":/translations"); + app.installTranslator(&appTranslator); + MainWindow w; // Move the MainWindow to the center -- cgit 1.5.1