aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-07-16 23:19:25 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2012-07-16 23:19:25 -0700
commitce652affe0ffec114bceb2e2c20ae1d015faca53 (patch)
tree85cf1946cc8629e874b3dacc6a47f81d1f2b5d11 /src/qt
parent14ad993895a527a4b42aef8b5c2ee0626b230ab2 (diff)
parent81ccec40424c725d816c447dce78b74709991687 (diff)
Merge pull request #1591 from Diapolo/lang_sel_Qt4.8
enhance lang-selection in OptionsDialog, when compiling with Qt >= 4.8
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/optionsdialog.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index e28b96b090..5f39c7814d 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -68,13 +68,23 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
/** check if the locale name consists of 2 parts (language_country) */
if(langStr.contains("_"))
{
+#if QT_VERSION >= 0x040800
+ /** display language strings as "native language - native country (locale name)", e.g. "Deutsch - Deutschland (de)" */
+ ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
+#else
/** display language strings as "language - country (locale name)", e.g. "German - Germany (de)" */
ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" - ") + QLocale::countryToString(locale.country()) + QString(" (") + langStr + QString(")"), QVariant(langStr));
+#endif
}
else
{
+#if QT_VERSION >= 0x040800
+ /** display language strings as "native language (locale name)", e.g. "Deutsch (de)" */
+ ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
+#else
/** display language strings as "language (locale name)", e.g. "German (de)" */
ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" (") + langStr + QString(")"), QVariant(langStr));
+#endif
}
}