From 31651d0210f2ff8e463fe977f0068e356edd9597 Mon Sep 17 00:00:00 2001 From: ersts Date: Fri, 23 May 2008 15:27:49 +0000 Subject: [PATCH] -update locale/userLocal when default locale is use as well as when --lang= option is used so that thirdparty plugins can be in the same language as the rest of QGIS git-svn-id: http://svn.osgeo.org/qgis/trunk@8497 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/app/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index 944236c01f6..4e90e680f04 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -431,7 +431,6 @@ int main(int argc, char *argv[]) /* Translation file for QGIS. */ QSettings mySettings; - QString mySystemLocale = QLocale::languageToString(QLocale::system().language()); QString myUserLocale = mySettings.value("locale/userLocale", "").toString(); bool myLocaleOverrideFlag = mySettings.value("locale/overrideFlag",false).toBool(); QString myLocale; @@ -453,6 +452,9 @@ int main(int argc, char *argv[]) if (!myLocaleOverrideFlag || myUserLocale.isEmpty()) { myTranslationCode = QLocale::system().name(); + //setting the locale/userLocale when the --lang= option is not set will allow third party + //plugins to always use the same locale as the QGIS, otherwise they can be out of sync + mySettings.setValue("locale/userLocale", myTranslationCode); } else {