I used to use the somewhat whimsical en_DK.UTF-8 locale when installing a new system because that would produce (roughly) the locale results I wanted, even though I am not in Denmark.
- Measurements metric
- Sensible date and time formats, but day and month names in English
- 24-hour time format
- Work week starts on Monday
- Numeric date in (something at least resembling) ISO format, yyyy-mm-dd
- Informal date is dd/mm, not the other way around
- A4 paper size
- Euro currency
- System messages in English
Alas, Ubuntu and Debian no longer seem to support the en_DK locale. I have been thinking there should be something like en_EU for “Euro English”.
Every place I have worked has had this sort of requirement — the official language of the organization is English, but we want continental European defaults for everything else.
I am imagining I am not the first person to think that a “location agnostic” English locale would benefit both me personally and the organizations I work for. So why does it not exist, and where do I look for further discussions and rationale?
… Or should I go ahead and propose it? To whom?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
en_IE.UTF-8 English (Ireland) locale has all the things you’re asking for:
- Measurements metric — yes
- 24-hour time format — yes
- Work week starts on Monday — yes
- Numeric date in (something at least resembling) ISO format, yyyy-mm-dd
— no, it this locale it’sdd/mm/yy. But that seems close enough to what you’re used to - Informal date is dd/mm, not the other way around — yes
- A4 paper size — yes
- Euro currency — yes
- System messages in English — yes
I’m actually using this locale, even though I’m in Amsterdam, as there is no English (Paneuropean) locale that I know of.
BTW. don’t make mistake of selecting ga_IE.UTF-8 Irish (Ireland) locale, as it’s Irish Gaelic language.
Method 2
(a) An entity known as the Unicode Common Locale Data Repository seems to be the place that handles locales. The glibc wiki indicates that they will follow CLDR.
(b) They have a locale known as “en_150” which seems to be intended to do what you want. I’m not sure glibc has implemented it yet. There’s also a similar locale known as en_BE which is identical to en_150 except that it has regional coverage of BE rather than worldwide.
Method 3
The en_DK locale doesn’t really have anything to do with Denmark except for its name. It was originally created by someone who wanted the same thing as requested here – a reasonable set of defaults for an English speaker in Europe. The name “en_DK” is sort of a joke – all locale names at that time were composed of a language code and a country code (there were no continent codes or anything else in the second position), and for whatever reason Denmark was chosen as the placeholder country code. (… and has probably caused more than one mystified person since then to research the proportion of people in Denmark whose first language is English. 🙂 )
Method 4
This is why you use different locale for different things.
In my case I mix en_GB and sv_SE to get what I need and it looks like this:
$> locale LANG=en_GB.UTF-8 LANGUAGE=en_GB:en LC_CTYPE="en_GB.UTF-8" LC_NUMERIC=sv_SE.utf8 LC_TIME=sv_SE.utf8 LC_COLLATE="en_GB.UTF-8" LC_MONETARY=sv_SE.utf8 LC_MESSAGES="en_GB.UTF-8" LC_PAPER=sv_SE.utf8 LC_NAME=sv_SE.UTF-8 LC_ADDRESS=sv_SE.UTF-8 LC_TELEPHONE=sv_SE.UTF-8 LC_MEASUREMENT=sv_SE.utf8 LC_IDENTIFICATION=sv_SE.UTF-8 LC_ALL=
But you would probably replace sv_SE with dk_DK.
And to get € use the LC_MONETARY=en_IE.UTF-8
I then save my config as a lot of exports in ~/.profile
export LC_MONETARY="en_IE.UTF-8"
This will give you the opportunity to pick the “correct” things from different areas.
Method 5
Actually, I believe there is a locale that fits your requirements better than en_IE. It’s unofficial, but it is en_SE.UTF-8. That is a link which points to the locale file.
It basically copies sv-SE, which should get you everything you want (though I haven’t double-checked), but gives you English system messages, menus, etc. I have used it before and it has worked very well for me in practice despite the caveats in the comment block at the top of the file.
To install:
- download so that the locale file is accessible as
/usr/share/i18n/locales/en_SE - run
sudo localedef -i en_SE -f UTF-8 en_SE.UTF-8 - add to
/var/lib/locales/supported.d/localthe lineen_SE.UTF-8 UTF-8(might be different based on distribution; Debian Squeeze/6.0 seems to be happy with/etc/locale.gen) - run
sudo locale-gen - set your system or account default locale to
en_SE.UTF-8(for example, through/etc/default/localeon Debian-like systems) - reboot, or log off and back on, to activate the new locale
Method 6
I use [email protected] ISO-8859-15
$ export LC_MONETARY= "<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="32575c6d7b77725747405d">[email protected]</a> ISO-8859-15"
… but I’m not exactly sure about measurements, considering using nl_NL.UTF-8 or nl_BE.UTF-8, the only issue I have with that is once I allow for such a library other apps might end up using it as reference for local lib and again start to download apps and service in dutch or even german.
winetricks drove me up the wall last night with vcrun6 even after changing the locale-gen removing any hint of German lib it still kept downloading a german version of redistributablec++, eventually did it manually, completely by launching the exe with wine.
Unbelievably I’m here again over the same issue; this time it’s APT and the local Belgian repo hell bent on editing my locale config, it can’t because I edited the permissions so instead I just get error complaints:
Fetched 207 kB in 0s (1381 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en",
LC_ALL = (unset),
LC_TIME = "nl_BE.UTF-8",
LC_MONETARY = "<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1d78734254585d78686f72">[email protected]</a> ISO-8859-15",
LC_ADDRESS = "nl_BE.UTF-8",
LC_TELEPHONE = "nl_BE.UTF-8",
LC_MESSAGES = "en_IE.UTF-8",
LC_NAME = "en_IE.UTF-8",
LC_MEASUREMENT = "nl_BE.UTF-8",
LC_IDENTIFICATION = "en_GB.UTF-8",
LC_NUMERIC = "nl_BE.UTF-8",
LC_PAPER = "en_IE.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
No compromise, all or nothing .. the only other solution would be to change repo I guess but I’ll never be completely trouble free since the keyboard is an AZERTY and by law it only does French of Belgian Dutch …. :'(
Method 7
See https://github.com/PanderMusubi/locale-en-nl for a proper English locale for the Netherlands, which is not possible to set by remixing existing locales by their LC_ environment settings.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0