Add load of translate QLibraryInfo to have standart button (and other stuff) translated
svn path=/trunk/; revision=45140
This commit is contained in:
parent
3738ed7370
commit
74d0df441e
@ -123,6 +123,7 @@
|
|||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#include <qtranslator.h>
|
#include <qtranslator.h>
|
||||||
#include <qlocale.h>
|
#include <qlocale.h>
|
||||||
|
#include <qlibraryinfo.h>
|
||||||
|
|
||||||
capture_file cfile;
|
capture_file cfile;
|
||||||
|
|
||||||
@ -646,6 +647,10 @@ int main(int argc, char *argv[])
|
|||||||
translator.load(QString(":/i18n/qtshark_") + locale);
|
translator.load(QString(":/i18n/qtshark_") + locale);
|
||||||
a.installTranslator(&translator);
|
a.installTranslator(&translator);
|
||||||
|
|
||||||
|
QTranslator qtTranslator;
|
||||||
|
qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
|
a.installTranslator(&qtTranslator);
|
||||||
|
|
||||||
// Hopefully we won't have to use QString::fromUtf8() in as many places.
|
// Hopefully we won't have to use QString::fromUtf8() in as many places.
|
||||||
QTextCodec *utf8codec = QTextCodec::codecForName("UTF-8");
|
QTextCodec *utf8codec = QTextCodec::codecForName("UTF-8");
|
||||||
QTextCodec::setCodecForCStrings(utf8codec);
|
QTextCodec::setCodecForCStrings(utf8codec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user