[QGIS-Developer] Locale in settings
Nicolas Godet
nicolas.godet at outlook.fr
Sat Jan 22 03:28:32 PST 2022
Dear devs,
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` ?
`globaleLocale` is OK with `fr_FR` for french.
Seconde question
I tried, using a .ini file with QGIS_GLOBAL_SETTINGS_FILE env var, to force locale settings when creating a new profile.
Plugins complains because the setting `userLocale` is not defined.
.ini file :
[locale]
userLocale=fr
overrideFlag=true
globalLocale=fr_FR
showGroupSeparator=false
When QGIS starts, Python error:
QSettings().value("locale/userLocale")[0:2]
NoneType is not scriptable.
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`.
Regards,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220122/c7d58d16/attachment.html>
More information about the QGIS-Developer
mailing list