Bug 322688 - Locale wrongly defaults to en_US.UTF8
Summary: Locale wrongly defaults to en_US.UTF8
Status: RESOLVED DOWNSTREAM
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_language (show other bugs)
Version: 4.10.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: John Layt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-22 13:39 UTC by Graeme Hewson
Modified: 2013-07-23 17:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graeme Hewson 2013-07-22 13:39:06 UTC
Country/Region & Language setting is very keen to write ~/.kde/env/setlocale.sh with the contents:

export LANG=en_US.UTF-8
export LANGUAGE=en_US:en

even when the Country is not United States of America.

To reproduce:

1. In Country/Region & Language setting, Country is United Kingdom (in my case). Also note that ~/.kde/env/setlocale.sh doesn't exist. I'm using Kubuntu.

2. Make some change (I changed Short date format from DD/MM/YY to YYYY-MM-DD) and click Apply.

3. Note that setlocale.sh has been written as above, with en_US values.

This means that when KDE is restarted, all LC_* variables are en_US.UTF-8 instead of the previous values of en_GB.UTF-8.

One workaround is to delete ~/.kde/env/setlocale.sh after making the required changes in System Settings.

Another workaround is to set the Preferred Language as well as making the other required change (Preferred Languages was previously empty on my system). Setting this to British English causes ~/.kde/env/setlocale.sh to be written with the contents:

export LANG=en_GB.UTF-8
export LANGUAGE=en_GB:en

Now there's an extreme demonstration of the problem. With Country set to United Kingdom, clicking Defaults subtly changes the Country to System Country (United Kingdom). Clicking Apply then changes the contents of setlocale.sh from the en_GB values to en_US values, even though other settings (Money, etc.) are appropriate for the UK.

Expected behaviour:

~/.kde/env/setlocale.sh should not be written if it doesn't exist and it's not
necessary to write it (LC_* variables are set elsewhere).
Comment 1 Christoph Feck 2013-07-23 09:52:24 UTC
Which distribution is that? KDE does not create that file, so it must be a distribution-specific patch.
Comment 2 Graeme Hewson 2013-07-23 16:59:31 UTC
I'm using Kubuntu 13.04. I've now raised bug https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1204182
Comment 3 Christoph Feck 2013-07-23 17:28:18 UTC
Merci, resolving downstream. Bug 319748 is related, not sure if it was also report to launchpad.