diff options
Diffstat (limited to 'rbutil/rbutilqt/main.cpp')
-rw-r--r-- | rbutil/rbutilqt/main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/main.cpp b/rbutil/rbutilqt/main.cpp index b8419c00a3..f1b4c8d5fd 100644 --- a/rbutil/rbutilqt/main.cpp +++ b/rbutil/rbutilqt/main.cpp @@ -37,12 +37,16 @@ int main( int argc, char ** argv ) { user = new QSettings(absolutePath + "/RockboxUtility.ini", QSettings::IniFormat, 0); else user = new QSettings(QSettings::IniFormat, QSettings::UserScope, "rockbox.org", "RockboxUtility"); + QString applang = QLocale::system().name(); QTranslator translator; // install translator if(!user->value("lang", "").toString().isEmpty()) { - if(!translator.load("rbutil_" + user->value("lang").toString(), absolutePath)) - translator.load("rbutil_" + user->value("lang").toString(), ":/lang"); - QLocale::setDefault(user->value("lang").toString()); + applang = user->value("lang", "").toString(); + } + if(!applang.isEmpty()) { + if(!translator.load("rbutil_" + applang, absolutePath)) + translator.load("rbutil_" + applang, ":/lang"); + QLocale::setDefault(applang); } delete user; app.installTranslator(&translator); |