Skip to content

Commit 05c7ae3

Browse files
author
ersts
committed
-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/qgis@8497 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 07d7e10 commit 05c7ae3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,6 @@ int main(int argc, char *argv[])
431431
/* Translation file for QGIS.
432432
*/
433433
QSettings mySettings;
434-
QString mySystemLocale = QLocale::languageToString(QLocale::system().language());
435434
QString myUserLocale = mySettings.value("locale/userLocale", "").toString();
436435
bool myLocaleOverrideFlag = mySettings.value("locale/overrideFlag",false).toBool();
437436
QString myLocale;
@@ -453,6 +452,9 @@ int main(int argc, char *argv[])
453452
if (!myLocaleOverrideFlag || myUserLocale.isEmpty())
454453
{
455454
myTranslationCode = QLocale::system().name();
455+
//setting the locale/userLocale when the --lang= option is not set will allow third party
456+
//plugins to always use the same locale as the QGIS, otherwise they can be out of sync
457+
mySettings.setValue("locale/userLocale", myTranslationCode);
456458
}
457459
else
458460
{

0 commit comments

Comments
 (0)