Bug 422636 - Cant change language in KDE / Regional settings to "American English" (without a second language)
Summary: Cant change language in KDE / Regional settings to "American English" (withou...
Status: RESOLVED DUPLICATE of bug 192019
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_language (show other bugs)
Version: 5.18.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-08 14:42 UTC by Axel Braun
Modified: 2022-01-13 15:16 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot 1st language english, system german (52.54 KB, image/png)
2020-06-08 14:42 UTC, Axel Braun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Braun 2020-06-08 14:42:39 UTC
Created attachment 129138 [details]
screenshot 1st language english, system german

SUMMARY
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

Expected behaviour:
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
Comment 1 Axel Braun 2020-06-28 07:48:23 UTC
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.

EXPECTED BEHAVIOUR
When selecting a language in KDE regional settings as primary language, all required settings are properly set by KDE
Comment 2 Axel Braun 2020-06-28 07:49:39 UTC
Current issue applys in 5.19.2 s well
Comment 3 Wolfgang Bauer 2020-06-30 10:57:06 UTC
(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)
Comment 4 Wolfgang Bauer 2020-06-30 11:18:29 UTC
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.
Comment 5 Wolfgang Bauer 2020-06-30 11:21:14 UTC
(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.
Comment 6 Wolfgang Bauer 2020-06-30 11:28:23 UTC
(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.
Comment 7 Wolfgang Bauer 2020-07-02 08:53:21 UTC
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.
Comment 8 Axel Braun 2020-07-06 08:29:50 UTC
Hello Wolfgang,
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|...
Comment 9 Patrick Silva 2020-07-18 22:21:48 UTC
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.
Comment 10 Nate Graham 2021-09-30 19:05:21 UTC

*** This bug has been marked as a duplicate of bug 192019 ***