1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Preferences: Fixed showing current language in languages menu.

This commit is contained in:
nowrep 2013-02-24 13:20:54 +01:00
parent d46d5c6786
commit 021e6315e0

View File

@ -373,14 +373,14 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
//OTHER
//Languages
QString activeLanguage;
if (!mApp->currentLanguageFile().isEmpty()) {
activeLanguage = mApp->currentLanguageFile();
QString activeLanguage = mApp->currentLanguage();
if (!activeLanguage.isEmpty() && activeLanguage != QLatin1String("en_US")) {
QLocale locale(activeLanguage);
QString country = QLocale::countryToString(locale.country());
QString language = QLocale::languageToString(locale.language());
ui->languages->addItem(language + ", " + country + " (" + activeLanguage + ")", activeLanguage);
}
ui->languages->addItem("English (en_US)");
QDir lanDir(mApp->TRANSLATIONSDIR);