Added 'English' and 'Use System Default' options.

These complete the ability to select languages from the preferences panel.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-12-06 17:48:38 -02:00 committed by Dirk Hohndel
parent 7436178fe0
commit 9b7b477d7c
4 changed files with 101 additions and 61 deletions

View file

@ -89,7 +89,12 @@ void init_ui(int *argcp, char ***argvp)
QSettings s;
s.beginGroup("Language");
QLocale loc(s.value("UiLanguage", QLocale().uiLanguages().first()).toString());
QLocale loc;
if (!s.value("UseSystemLanguage", true).toBool()){
loc = QLocale(s.value("UiLanguage", QLocale().uiLanguages().first()).toString());
}
QString uiLang = loc.uiLanguages().first();
s.endGroup();