<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear devs,<br>
<br>
Before raising a bug (if it's really a bug), I was wondering why the `userLocale` in QgsSettings is stored using a short string, eg. `fr` for french instead of `fr_FR` ?<br>
`globaleLocale` is OK with `fr_FR` for french.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Seconde question<br>
I tried, using a .ini file with QGIS_GLOBAL_SETTINGS_FILE env var, to force locale settings when creating a new profile.<br>
Plugins complains because the setting `userLocale` is not defined.<br>
<br>
.ini file :</div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">[locale]</span>
<div><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">userLocale=fr</span></div>
<div><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">overrideFlag=true</span></div>
<div><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">globalLocale=fr_FR</span></div>
<span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">showGroupSeparator=false</span><br>
</div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">When QGIS starts, Python error:</span></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">QSettings().value("locale/userLocale")[0:2]<br>
</span></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">NoneType is not scriptable.</span></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">And in Python console, if I execute the above command, the return is empty but in settings, the setting `locale/userLocale` is set to `fr`.</span></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Regards,</span></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Nicolas</span></div>
</body>
</html>