#include "FluApp.h" #include #include #include #include #include #include #include #include #include FluApp::FluApp(QObject *parent):QObject{parent}{ useSystemAppBar(false); } FluApp::~FluApp(){ } void FluApp::init(QObject *target,QLocale locale){ _locale = locale; _engine = qmlEngine(target); _translator = new QTranslator(this); qApp->installTranslator(_translator); const QStringList uiLanguages = _locale.uiLanguages(); for (const QString &name : uiLanguages) { const QString baseName = "fluentui_" + QLocale(name).name(); if (_translator->load(":/qt/qml/FluentUI/i18n/"+ baseName)) { _engine->retranslate(); break; } } }