Translation of qt messages
This commit is contained in:
parent
0f9dfd73b8
commit
dc2bd63d3a
1 changed files with 8 additions and 0 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue