mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-09 13:37:47 +00:00
Add translation infrastructure
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#include <cstdint>
|
||||
#include <QApplication>
|
||||
#include <QStyleFactory>
|
||||
#include <QTranslator>
|
||||
#include "MainWindow.hpp"
|
||||
#include "boo/IApplication.hpp"
|
||||
#include <QResource>
|
||||
|
||||
using namespace std::literals;
|
||||
|
||||
@@ -89,6 +91,11 @@ int main(int argc, char* argv[])
|
||||
BooInterface booApp;
|
||||
boo::APP = &booApp;
|
||||
|
||||
Q_INIT_RESOURCE(translation_res);
|
||||
QTranslator translator;
|
||||
if (translator.load(QLocale(), QLatin1String("lang"), QLatin1String("_"), QLatin1String(":/translations")))
|
||||
a.installTranslator(&translator);
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
|
||||
Reference in New Issue
Block a user