Created attachment 129138 [details]
screenshot 1st language english, system german
I have a system set up in german and need one user to have english as default language.
When logging in with this user the language is german. When opening SystemSettings -> Regional settings, it says 'American English' is the default language (see sceenshot).
Quite obvious, the user is logged in in German.
Solution: Add a second language (e.g. german) and leave English as first language. After the next login the language is switched to english
First language in the list is taken, even without a second language added
Operating System: openSUSE Tumbleweed 20200604
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.15.0
Kernel Version: 5.6.14-1-default
I did some more investigations on this.
Even if you set British English as second language, some programs (VLC for example) come up in German
The issue is that ~/.config/plasma-localerc the entry in [Formats] still has the system-wide setting (de_DE.UTF-8 in my case)
Switching this MANUALLY to LANG=en_US.UTF-8 gives finally the desired result.
When selecting a language in KDE regional settings as primary language, all required settings are properly set by KDE
Current issue applys in 5.19.2 s well
(In reply to Axel Braun from comment #1)
> The issue is that ~/.config/plasma-localerc the entry in [Formats] still has
> the system-wide setting (de_DE.UTF-8 in my case)
> Switching this MANUALLY to LANG=en_US.UTF-8 gives finally the desired result.
JFYI: your expectations are wrong here AFAICT.
If you want to change LANG, you have to use the "Formats" settings module, and change the Region there.
Changing the language in "Language" only sets LANGUAGE, by design. (LANG affects more than just the language, e.g. also the date format, currency, and sort order)
Regarding your original problem:
I think one reason is that LANGUAGE is empty by default, despite what the "Language" settings module shows. I.e. applications are actually using what's defined by LANG.
(On my system, with LANG=de_AT.UTF-8 and LANGUAGE empty, it shows "German (Default)" though, so that works as expected here I'd say)
Only if you explicitly change the language(s) in the "Language" settings module, LANGUAGE will additionally be set to override (only) the language of applications.
If you add German as a second language after "American English", LANGUAGE will be set to "en:de" (or similar). But as there (usually) are no "en" translations because the english strings are built-in, the german translations are used as a fallback. There is a bug report about this already, but I cannot find it right now. (Although, that's actually how gettext itself behaves anyway)
So all in all I don't really see a bug in KDE here, just possibly confusing behavior of the "Language" KCM maybe, in the case that LANGUAGE is not yet set.
On my system (Leap 15.1 with the latest Qt/Plasma/KF5 from additional repos), with LANG=de_AT.UTF-8 and LANGUAGE empty, it shows "German (Default)" though, so I don't really see what you see here.
(In reply to Wolfgang Bauer from comment #4)
> If you add German as a second language after "American English", LANGUAGE
> will be set to "en:de" (or similar). But as there (usually) are no "en"
> translations because the english strings are built-in, the german
> translations are used as a fallback.
PS: maybe you get what you want by removing the "German" as second language again.
LANGUAGE=en (or en_US) should work as expected I think, even if there are no real "en" (or "en_US") translations. But I'm not sure if the current settings module actually writes LANGUAGE then or just removes it.
(In reply to Wolfgang Bauer from comment #5)
> But I'm not sure if the current
> settings module actually writes LANGUAGE then or just removes it.
Ok, I just tested that:
I added "American English" to the list (as second language), plasma-localerc contained "LANGUAGE=de:en_US" then as I would expect.
But removing "German (Default)" from the list resulted in "LANGUAGE[$d]".
So it's indeed not possible to explicitly set only "American English" as language.
PS: with "LANGUAGE[$d]" in plasma-localerc, the KCM does show "American English (Default)" here as well, removing the line completely changes that to "Deutsch (Default)" again.
Btw, setting the language to e.g. German only does work fine (resulting in "LANGUAGE=de" in the config file), i.e. it does *not* need *two* languages to work, so I'll adjust the summary.
thank you for your detailed explanations.
The change of 'Formats' helps indeed to set the desired language.
Maybe regrouping of items in this modules makes it clearer:
Move 'Formats' to the top and rename it 'Language'|Main language|i18n settings|...
Move current 'Language' into 2nd position and rename it Add. translations| addl. Languages|...
On my system, if I leave just one language in Languages kcm (American English in my case) and it is different from the language of the region configured in Formats kcm (Brazil in my case), Plasma uses the language of the region selected in Formats kcm after re-login.
If I add both American English and Portuguese to Languages kcm then I can use American English as Plasma language and formats from Brazil at the same time.
My bug report possibly related to this one: bug 420268.
*** This bug has been marked as a duplicate of bug 192019 ***