mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Add localisation support
- Tested with Dutch and Chinese. - Chinese translation courtesy of @YuzukiTsuru
This commit is contained in:
parent
224ebebb04
commit
73b9ae764d
5 changed files with 702 additions and 3 deletions
5
main.cpp
5
main.cpp
|
@ -16,6 +16,8 @@
|
|||
#include <QtWidgets/QApplication>
|
||||
#include <QMessageLogContext>
|
||||
#include <QQuickWindow>
|
||||
#include <QTranslator>
|
||||
#include <QLocale>
|
||||
|
||||
static QTextStream cerr(stderr);
|
||||
|
||||
|
@ -40,6 +42,9 @@ int main(int argc, char *argv[])
|
|||
ImageWriter imageWriter;
|
||||
NetworkAccessManagerFactory namf;
|
||||
QQmlApplicationEngine engine;
|
||||
QTranslator translator;
|
||||
if (translator.load(QLocale(), "rpi-imager", "_", QLatin1String(":/i18n")))
|
||||
QCoreApplication::installTranslator(&translator);
|
||||
|
||||
/* Parse commandline arguments (if any) */
|
||||
QString customRepo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue