The wonderful en_DK locale

English is generally great for communication, but there's a certain awkwardness when it comes to date/time formatting rules. Specifically, I live in a country which, like most Europen countries has a "day, month, year" native ordering and %d.%m.%Y formatting, but aspires to one day adopt ISO 8601. The default en_* locales don't support such a patchwork of formatting, so there are hacks to get around that; en_DK is one of those hacks, used by many Linuxes to get English with different date/time formatting.

The en_DK locale is a hack on locales; I suspect it's named so for the dose of humor. Various Linuxes have adapted en_DK as a kludge which has the english dictionary and charmap but various European or international date/time formatting. Since it was refused in FreeBSD for reasons of purity over user convenience, I guess everyone has to roll their own now.

Since I need that situation, I rolled my own en_DK-UTF-8 locale. The archive should be extracted in /usr/share/locale. It has the following features:

  • Plain english UTF-8 encoding / collating
  • Euro (€) as currency
  • 24 hour time
  • day-month-year for many common formattings
  • Y-m-d for the "long" format

The last two items - date/time formatting may not fit everyone because it's such a mix. I'm not sure it fits even my purpose but I'll leave it at that for now.

#1 Re: The wonderful en_DK locale

Added on 2011-01-13T21:07 by Lapo Luchini

Well, "just make it a port" isn't really a "refusal" to me. Who will go on and do a port for all the users' sake now? ;-)

Comments !