Skip to content
Snippets Groups Projects
Commit fba4ccf4 authored by akiraohgaki's avatar akiraohgaki
Browse files

Add translator

parent e635d4e4
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,9 @@
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QTranslator>
#include <QLocale>
#include "handlers/confighandler.h"
#include "handlers/ocsurlhandler.h"
......@@ -41,6 +44,12 @@ int main(int argc, char *argv[])
QString ocsUrl = args.at(0);
// Setup translator
QTranslator translator;
if (translator.load(QLocale(), appConfigApplication["id"].toString(), ".", ":/qm")) {
app.installTranslator(&translator);
}
// Setup QML
QQmlApplicationEngine qmlAppEngine;
QQmlContext *qmlContext = qmlAppEngine.rootContext();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment