Translation of qt messages

This commit is contained in:
Jean Pierre Cimalando 2020-05-15 00:12:00 +02:00
parent 0f9dfd73b8
commit dc2bd63d3a

View file

@ -27,6 +27,7 @@
#include <QDir>
#include <QTextStream>
#include <QTranslator>
#include <QLibraryInfo>
#include "global.h"
#include "clientdlg.h"
#include "serverdlg.h"
@ -555,6 +556,7 @@ int main ( int argc, char** argv )
// load translations
QTranslator myappTranslator;
QTranslator myqtTranslator;
if ( bUseGUI && bUseTranslation )
{
@ -562,6 +564,12 @@ int main ( int argc, char** argv )
{
pApp->installTranslator ( &myappTranslator );
}
QString myqtLocation = QLibraryInfo::location( QLibraryInfo::TranslationsPath );
if ( myqtTranslator.load ( QLocale(), "qt", "_", myqtLocation ) )
{
pApp->installTranslator ( &myqtTranslator );
}
}