summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/rbsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/rbsettings.cpp')
-rw-r--r--rbutil/rbutilqt/rbsettings.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp
index 38ed542ee7..d1f90ea7f6 100644
--- a/rbutil/rbutilqt/rbsettings.cpp
+++ b/rbutil/rbutilqt/rbsettings.cpp
@@ -252,7 +252,13 @@ QString RbSettings::curVoiceName()
QString RbSettings::curLang()
{
- return userSettings->value("lang").toString();
+ // QSettings::value only returns the default when the setting
+ // doesn't exist. Make sure to return the system language if
+ // the language in the configuration is present but empty too.
+ QString lang = userSettings->value("lang").toString();
+ if(lang.isEmpty())
+ lang = QLocale::system().name();
+ return lang;
}
QString RbSettings::curEncoder()