Commit 97f9a52c authored by Jan Möbius's avatar Jan Möbius

Load translations for Core on startup

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6703 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 20bc2984
......@@ -318,6 +318,23 @@ int main(int argc, char **argv)
if ( !parseCommandLineOptions(args) )
return 1;
// Install translator for qt internals
QTranslator qtTranslator;
std::cerr << "Loading qt translations from: " << QLibraryInfo::location(QLibraryInfo::TranslationsPath).toStdString() << std::endl;
if ( qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath)) )
std::cerr << "Loaded" << std::endl;
app.installTranslator(&qtTranslator);
// install translator for Core Application
QTranslator myappTranslator;
std::cerr << "Loading own translations from: " << QString(OpenFlipper::Options::translationsDirStr() + QDir::separator() + "CoreApp_" + QLocale::system().name()).toStdString() << std::endl;
if ( myappTranslator.load(OpenFlipper::Options::translationsDirStr() + QDir::separator() + "CoreApp_" + QLocale::system().name()) )
std::cerr << "Loaded" << std::endl;
app.installTranslator(&myappTranslator);
// After setting all Options from command line, build the real gui
w->init();
......@@ -329,7 +346,7 @@ int main(int argc, char **argv)
}
for ( int i = 0 ; i < args.FileCount(); ++i )
w->commandLineOpen(args.File(i), openPolyMeshes);
w->commandLineOpen(args.File(i), openPolyMeshes);
return app.exec();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment