135

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?

tripleee
  • 7,699
  • 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? –  Jan 23 '13 at 14:04
  • 5
    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
  • 3
    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
  • Locales were created for language/nation combo's and not for political or geographical groups of nations. If they derive from the 'nation' standard, people will be requesting 'spanish/NorthAmerica' or 'english/cree' (Indian tribe) or stuff like that. They'll totally lose control. – Jeach Jan 24 '13 at 19:24
  • 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
  • Er um, except es_US and es_CA should be distinct, but I guess that's not what you were getting at? In fact I think I have seen es_US somewhere. – tripleee Jan 24 '13 at 21:47
  • @tripleee: It's just that how would you determine hierarchy? Is 'en_NA' go before 'en_US' or after in the resolution path? Does 'en/cree' go after or before 'en_US'? Only having language/nation, we know what to expect, introducing others could become quite 'out of control' as I mentioned (but that's only my opinion). – Jeach Jan 25 '13 at 16:20
  • 1
    I don't understand the question. Where does a hierarchy exist? I'm fine with a web site or application having a default for my territory, but if I want messages in Esperanto and a Mayan calendar and Roman numbers for my own convenience or amusement, it would be nice if they were available as options. – tripleee Jan 26 '13 at 07:32
  • A "universal English" locale would also be useful as a default for territories for which no other default is available (e.g. Antarctica, or if you don't have translations etc. for a territory like Greenland or Bhutan). – tripleee Jan 26 '13 at 08:32
  • @tripleee: What I mean by 'hierarchy' is the order in which the records in locals are resolved. – Jeach Feb 05 '13 at 21:41
  • 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 01:00
  • 1
    You may also be interested in LC_TIME=C.UTF-8: https://stackoverflow.com/questions/55673886/what-is-the-difference-between-c-utf-8-and-en-us-utf-8-locales/61064759#61064759. – baptx Apr 06 '20 at 16:47
  • 2
    @MichaelScheper Actually "organization' can be considered en-GB-Oxendict (See: https://en.wikipedia.org/wiki/Oxford_spelling), which is widely used internationally. There is also a UN organization called International Labour Organization (https://en.wikipedia.org/wiki/International_Labour_Organization). Note the "-our" and "-zation". – Zhuoyun Wei Sep 24 '20 at 22:53
  • % sudo localedef -i ./en_SE -f UTF-8 en_SE.UTF-8 [error] LC_IDENTIFICATION: unknown standard en_SE:2000' for categoryLC_CTYPE' [error] LC_IDENTIFICATION: unknown standard en_SE:2000' for categoryLC_NUMERIC' [error] LC_IDENTIFICATION: unknown standard en_SE:2000' for categoryLC_TIME' (... etc. ...) – Boyd Stephen Smith Jr. Feb 01 '21 at 03:46
  • @BoydStephenSmithJr. Are you trying to complain that this locale definition is not available out of the box, or are you trying to report a bug against the custom en_SE package advertised in one of the answers? Either way, commenting on the question doesn't seem like a useful thing to do. – tripleee Feb 01 '21 at 11:15
  • @tripleee Yeah, I meant to comment on one of the answers. Between having to login and copy-paste the results, it somehow got in the wrong submission box. – Boyd Stephen Smith Jr. Feb 01 '21 at 17:40

8 Answers8

104

en_IE.UTF-8 English (Ireland) locale has nearly 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 the mistake of selecting the ga_IE.UTF-8 Irish (Ireland) locale, as it's Irish Gaelic language.

Carolus
  • 212
  • 1
  • 10
vartec
  • 1,054
  • 4
    Ah, the good old Irish! Great find. –  Jan 23 '13 at 14:17
  • 7
    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
  • 1
    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
  • 2
    Update to my last comment: to display ISO 8601 dates (yyyy-mm-dd) in Thunderbird on Linux, you can use LC_TIME=en_DK.utf8 in /etc/default/locale http://kb.mozillazine.org/Date_display_format – baptx Feb 21 '16 at 21:44
  • Unfortunately, it seems that the Irish do not use the comma (,) decimal separator, as the rest of the continental Europe. – AsGoodAsItGets Feb 16 '21 at 13:10
  • Great find! Props also for the decimal dot, to avoid breaking Excel and other programs that would otherwise break horribly whenever numeric data is pasted or read from text files. (the EU should officially switch to dot too, like the rest of the world, also in numpad keymaps) – Tronic Jun 28 '21 at 06:17
21

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

snakeroot
  • 421
19

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

David
  • 191
8

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.

Johan
  • 4,583
  • 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 01 '15 at 07:06
  • 1
    LC_TIME=sv_SE.utf8 basically means that the names of weekdays and months will be unintelligible to non-speakers of Swedish. – Carolus Apr 11 '23 at 14:18
6

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
user
  • 28,901
  • 8
    But Sweden didn't adopt €. – mouviciel Jan 23 '13 at 19:09
  • @mouviciel Did Ireland? – user Jan 24 '13 at 08:21
  • 6
  • @mouviciel Drat, it does indeed look like you are right. So this doesn't fit the stated requirements perfectly either (strictly speaking neither does en-IE because of the numeric date format). – user Jan 24 '13 at 08:36
  • 2
    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
  • 4
    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 06:11
  • In fact, I have abandoned en_IE for now because I got tired of asking admins to set up this locale for me. While it's technically trivial, the everlasting hassle simply outweighs the convenience. – tripleee Dec 18 '13 at 17:16
  • My terminal applications didn't like this locale, and trying to follow the directions just gave me a series of errors from localedef. KDE seems to use en_SE fine though. – Boyd Stephen Smith Jr. Feb 01 '21 at 04:14
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 .... :'(

tripleee
  • 7,699
  • 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

Many answers here mix language and region, with are not to be mixed. en_US means the American English variant, just as en_IE means the Irish English variant. It is perfectly fine to live in Hungary and use American English as a language.

The regional specifics are set with the other variables of locale, like LC_TIME, LC_MONETARY, etc.

For the lazy, and where language matches country, one can of course use LANG or LC_ALL to make the setting quicker.

There are some tries to have international English language and region, like en_001, en_150, but that is all broken. The language is not really defined (or, it is just en_US), and the regional settings do not try to get unambiguous. To give just two examples: these international English locale attempts still have comma as thousands separator, instead of using an unambiguous thin space or Arabic thousands separator (single quote), they still have traditional quotes and double quotes instead of open and close like Asian quotes or guillemets (「 」, « »).

tripleee
  • 7,699
soloturn
  • 121
  • 2
    This feels more like a comment than an answer. – tripleee Nov 07 '23 at 05:39
  • Do they use such special quotes in Europe, then? I see they have some advantage, though. – jarno Nov 07 '23 at 11:40
  • 1
    @jarno There are many regional differences between the correct uses of quotes, but these are generally language-dependent, not locale-dependent. To write English in Germany you'd still use English quoting conventions, for example. I suspect the OP is actually trying to make a distinction between straight ASCII quotes (' and ") and proper typographical quotes (‘’ and “”), or mixing up that criticism with a different and (to me, at least) more obscure one. – tripleee Nov 13 '23 at 05:59
-1

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.