You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QGIS has some 'startup options' if started from the commandline.
One I often use is the --lang nl one, to (temporarily) start QGIS in dutch to check for example what a menu looks like in dutch.
Plugins (created with the plugin builder) for what I know check the language using (for example in Python Console):
QgsApplication.instance().locale()
BUT that (in case of starting up with --lang option) does not show the same 2char code.
Also note that in the settings at that moment the 'Ignore System Locale' is not checked and does not resemble current situation. For example below I run qgis --lang nl on an english system (it looks like the locale for numbers is changed there):
To reproduce:
on english system
start QGIS qgis --lang nl in cli
see that QGIS interface is dutch
in python console do: QgsApplication.instance().locale() and see it shows en
@m-kuhn maybe has something to do with the work for the swiss to split up locale/language and locale for the use of numbers etc ?
NOTE2: if you do this via the Settings: all is working:
Maybe that could show BOTH the system locale AND the set locale?
The text was updated successfully, but these errors were encountered:
The same also happens also the OS is configured to a language and the qgis settings are left to the default. Default plugin builder generated code will fail.
What would be good is a more stable code for plugin builder generated code to obtain the language.
And QSettings().value('locale/userLocale', QLocale().name()) (from plugin code) returns 'nl' if QGIS is started with --lang option, so for plugins this is fixed/fixable.
What is unclear to me is how the Settings part in the dialog should behave...
As you see in the first screenie, the (disabled! in grey) options do not represent the current state. While I started with --lang nl (which should mean: (only) language NL, locale still 'whatever') the two (disabled dropdowns) show: 'Vertaling'/'Language' is english and 'Landinstelling'/'Locale' as Dutch.
I think(!) that if started with --lang option, the checkbox 'Override System Locale' should be checked and (only) the 'User interface translation' dropdown should then reflect the --lang language?
QGIS has some 'startup options' if started from the commandline.
One I often use is the
--lang nl
one, to (temporarily) start QGIS in dutch to check for example what a menu looks like in dutch.Plugins (created with the plugin builder) for what I know check the language using (for example in Python Console):
BUT that (in case of starting up with --lang option) does not show the same 2char code.
Also note that in the settings at that moment the 'Ignore System Locale' is not checked and does not resemble current situation. For example below I run
qgis --lang nl
on an english system (it looks like the locale for numbers is changed there):To reproduce:
qgis --lang nl
in cliQgsApplication.instance().locale()
and see it showsen
@m-kuhn maybe has something to do with the work for the swiss to split up locale/language and locale for the use of numbers etc ?
NOTE2: if you do this via the Settings: all is working:
Maybe that could show BOTH the system locale AND the set locale?
The text was updated successfully, but these errors were encountered: