[Qgis-developer] Plugin Translation
Borys Jurgiel
borysiasty at aster.pl
Tue Apr 28 03:41:40 EDT 2009
> I was wondering if the mySettings is available via the python api so
> that it can be checked by my new function. In fact changing the setting
> in QGIS doesn't work either for plugins(Horst's or mine) since we don't
> know how to detect the QGIS setting and only rely on the system setting
> for now.
Yes, it's very simple to use:
settings = QSettings()
if settings.value("locale/overrideFlag").toBool():
myLocale = settings.value("locale/userLocale").toString()
else:
myLocale = ... # give the system settings
For more info look:
http://doc.trolltech.com/4.1/qsettings.html
http://doc.trolltech.com/4.1/qvariant.html
~/.config/QuantumGIS/QGIS.conf
Nice Day to Everybody!
B.
More information about the Qgis-developer
mailing list