94

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?

  • 1
    I'm sure this would be a good question somewhere on the StackExchange network, but it's not really a programming problem, is it? – pdr Jan 23 '13 at 14:04
  • 1
    You get me confused here. Denmark has never adopted the Euro AFAIK, and both Debian testing and unstable still have a en_DK locale (with DKK/kr currency) – Stéphane Chazelas Jan 23 '13 at 20:50
  • 1
    Actually I had just lived with the fact that it had the wrong currency; I don't really need that feature, but it came up as one of the things to include in the question for completeness' sake. This en_DK locale is a weird curiosity; where did it originate, and why are there not random English locales for other countries? It's hardly like Denmark has an unusually high ratio of English speakers. – tripleee Jan 24 '13 at 11:36
  • 5
    @Jeach: who would lose control? Over what? Is that a bad thing? Why is a soverign state a good, and/or the only acceptable stakeholder for this? Spanish settings for North America sounds fairly analogous to my scenario; I'm pretty sure there would be a demand for that. And I don't see why the Cree scenario should be ruled out, either, although a real-world demand would be a sensible requirement from a standardizing body. – tripleee Jan 24 '13 at 21:45
  • 2
    I sympathise, but I'm also amused that you're spelling 'organisation' with spelling specific to two or three countries (e.g. en_US, maybe en_CA), and not the way most English speakers would internationally. The real solution, IMHO, is to have separate settings for different contexts. For example, when I live in the US, I prefer to use normal English and standard measurements, but US paper sizes. The fact that USAns call their oddball measurements 'English' does add confusion, though—the English have been using mostly metric for decades, and many of their units differed from the US. – Michael Scheper Oct 14 '14 at 1:00
13

(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.

  • Interesting but I have tried export LC_TIME=en_150.UTF-8 (and en_BE) on Xubuntu 14.04 LTS and it displays bash: warning: setlocale: LC_TIME: cannot change locale (en_150.UTF-8): No such file or directory – baptx Feb 21 '16 at 21:47
79

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's dd/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.

  • 1
    Ah, the good old Irish! Great find. – Marjan Venema Jan 23 '13 at 14:17
  • 3
    I am accepting this answer as it solves the problem to my complete satisfaction. I'd still like to find pointers to whether a "universal English" locale has been proposed in the past, and/or where such a proposal should be sent. The library standardization process part of this question is the reason I originally posted it to PSE, but I don't know if it's suitable there (or anywhere else in the *SE network). – tripleee Jan 24 '13 at 11:18
  • @tripleee: only thing that like that, which comes to mind is Windows 98 Pan-European version, which was in English, but with European locale and support for European characters. I've not heard of any attempt to create official Pan-Euro locale. – vartec Jan 24 '13 at 11:50
  • I have typed command "sudo update-locale LANG=en_IE.UTF-8 LC_MESSAGES=POSIX" and after reboot, when you reply to an email with Thunderbird, it will use standard dd/mm/yy and not yyyy-mm-dd (I tried with Ubuntu 14.04 and Thunderbird 31.1.2). – baptx Sep 29 '14 at 13:19
  • A universal English locale might need to consider the thousands separate. Yes, all (native) English speakers use the comma (I think?), but many Europeans use a period (.) even when writing English. I'm beginning to be convinced that the apostrophe ' (used by the Swiss), with . for the fractional part, would be a good candidate. It works in csv files and I'm not aware of anywhere that uses ' for fractional numbers. – Aaron McDaid Aug 17 '15 at 14:29
9

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. :) )

  • 5
    Do you have a source for DK having been chosen whimsically? (I do agree it's the only locale out there with reasonable settings...) – Celada Mar 28 '16 at 17:27
  • 1
    Agree that this answer would benefit from at least anecdotal pointers for further research. But thanks for this tidbit already. – tripleee Mar 28 '16 at 18:55
  • Apparently there's actually en_DK locale in unicode – sanmai Dec 17 '16 at 8:26
  • 1
    The only problem is that it uses DKK as the currency. – Alen Siljak Apr 15 '18 at 11:25
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.

  • I would in fact not replace sv_SE with dk_DK -- like I stated in my question, I picked Danish settings because they coincidentally and somewhat confusingly offered the features I wanted, even though I have no reason or desire to have anything specific to Denmark in my settings, and in fact, that is what I am trying to avoid. Somewhat similarly, sv_SE makes (some sort of) sense for LC_TIME regardless of where in the world you are, because Sweden uses ISO dates by standard, unlike many other locales. – tripleee Oct 1 '15 at 7:06
3

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:

  1. download so that the locale file is accessible as /usr/share/i18n/locales/en_SE
  2. run sudo localedef -i en_SE -f UTF-8 en_SE.UTF-8
  3. add to /var/lib/locales/supported.d/local the line en_SE.UTF-8 UTF-8 (might be different based on distribution; Debian Squeeze/6.0 seems to be happy with /etc/locale.gen)
  4. run sudo locale-gen
  5. set your system or account default locale to en_SE.UTF-8 (for example, through /etc/default/locale on Debian-like systems)
  6. reboot, or log off and back on, to activate the new locale
  • 6
    But Sweden didn't adopt €. – mouviciel Jan 23 '13 at 19:09
  • @mouviciel Did Ireland? – a CVn Jan 24 '13 at 8:21
  • 5
    Yes – mouviciel Jan 24 '13 at 8:24
  • 1
    Also this has the definite drawback (along with en_DK) that it's a decidedly unobvious workaround for people not living in that particular country. You could argue that en_IE doesn't completely pass that (additional) requirement, either; but at least it's possible to reason logically about the problem and reach that as a fair enough conclusion (although I had personally not reached it, based on multiple false assumptions about how things are done in Ireland). – tripleee Jan 24 '13 at 11:32
  • 1
    Also, the locale travels with you when you ssh to remote systems, and you will get all sorts of annoying warnings if your locale is not installed on the remote system as well. – tripleee Jan 25 '13 at 6:11
1

I use en_IE@euro ISO-8859-15

$ export LC_MONETARY= "en_IE@euro 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 = "en_IE@euro 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 .... :'(

  • That sounds weird. The LC_MONETARY or LC_MEASUREMENT settings are certainly not supposed to affect the message catalog language. – tripleee Jul 22 '17 at 14:48
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.