aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r--src/qt/optionsmodel.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 5bba308cf2..78448d3ee1 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -21,6 +21,7 @@ void OptionsModel::Init()
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
+ language = settings.value("language", "").toString();
// These are shared with core bitcoin; we want
// command-line options to override the GUI settings:
@@ -30,6 +31,8 @@ void OptionsModel::Init()
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
+ if (!language.isEmpty())
+ SoftSetArg("-lang", language.toStdString());
}
bool OptionsModel::Upgrade()
@@ -125,6 +128,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
return QVariant(bDisplayAddresses);
case DetachDatabases:
return QVariant(fDetachDB);
+ case Language:
+ return settings.value("language", "");
default:
return QVariant();
}
@@ -213,6 +218,10 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
settings.setValue("detachDB", fDetachDB);
}
break;
+ case Language: {
+ settings.setValue("language", value);
+ }
+ break;
default:
break;
}