Add load of translate QLibraryInfo to have standart button (and other stuff) translated

svn path=/trunk/; revision=45140
This commit is contained in:
Alexis La Goutte 2012-09-25 20:18:02 +00:00
parent 3738ed7370
commit 74d0df441e

View File

@ -123,6 +123,7 @@
#include <QTextCodec>
#include <qtranslator.h>
#include <qlocale.h>
#include <qlibraryinfo.h>
capture_file cfile;
@ -646,6 +647,10 @@ int main(int argc, char *argv[])
translator.load(QString(":/i18n/qtshark_") + locale);
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.
QTextCodec *utf8codec = QTextCodec::codecForName("UTF-8");
QTextCodec::setCodecForCStrings(utf8codec);