summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-07-31 19:26:58 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-07-31 19:26:58 +0000
commitd2241e4e48ac920c9207b06c05078cb8efbce330 (patch)
treec9da2da509b662ea6fa8d5fb6ec8508b2bb737ca /rbutil
parentaa52f0b81cd425ebac54b629f49b67ab29360ebd (diff)
downloadrockbox-d2241e4e48ac920c9207b06c05078cb8efbce330.tar.gz
rockbox-d2241e4e48ac920c9207b06c05078cb8efbce330.tar.bz2
rockbox-d2241e4e48ac920c9207b06c05078cb8efbce330.zip
Install a second translator for using the internal translation of Qt's widgets. Embedding them into the resources is still missing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18165 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/main.cpp b/rbutil/rbutilqt/main.cpp
index f1b4c8d5fd..745ebef33b 100644
--- a/rbutil/rbutilqt/main.cpp
+++ b/rbutil/rbutilqt/main.cpp
@@ -39,6 +39,7 @@ int main( int argc, char ** argv ) {
QString applang = QLocale::system().name();
QTranslator translator;
+ QTranslator qttrans;
// install translator
if(!user->value("lang", "").toString().isEmpty()) {
applang = user->value("lang", "").toString();
@@ -46,10 +47,15 @@ int main( int argc, char ** argv ) {
if(!applang.isEmpty()) {
if(!translator.load("rbutil_" + applang, absolutePath))
translator.load("rbutil_" + applang, ":/lang");
+ if(!qttrans.load("qt_" + applang,
+ QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+ translator.load("qt_" + applang, ":/lang");
+
QLocale::setDefault(applang);
}
delete user;
app.installTranslator(&translator);
+ app.installTranslator(&qttrans);
RbUtilQt window(0);
window.show();