English language locale for the Netherlands (en_NL)
Many users who are physically located in the Netherlands use software in the American English language. Most of them are native Dutch speakers working in IT, but this also applies for non-Dutch expats in the Netherlands. In their work they usually have their systems configured to US English International. However, due to the geographic location or territory they reside in, it can be highly desirable for certain data to be represented according to the local Dutch notation, while the rest remains in English.
It is possible to configure a system by setting a mix of LC sections of different locales, which are part of glibc. For example the LC_MONETARY of en_US and LC_TIME of nl_NL. Nevertheless, it is not possible to mix on section level only to get a proper locale with English language in the Netherlands territory. This requires a custom locale to correctly set fields in the sections LC_MONETARY, LC_TIME and LC_ADDRESS.
For this reason the locale called en_NL has been created. It is based on the locale en_US and has some carefully mixed parts from nl_NL. Note that this specific configuration is impossible to obtain by using locale nl_NL and setting LANGUAGES to en or other mixed LC section usage. This justifies an en_NL locale.
Each section of en_NL has been documented how it was composed. The comment indicating that can be one of:
% From en_US% From nl_NL% Custom en_NL
For a more comprehensible comparison, see the section on validation below.
As en_NL is not yet included in glibc, there are two ways of installing the locale.
TODO
TODO
Install the locale en_NL with ./add.sh or running the commands from that
script manually. This script supports Debian/Ubuntu, Fedora/Red Hat and OpenSUSE.
The LC_CTYPE provided by this locale is identical to that provided by en_US.UTF-8.
Nevertheless, further intervention is required to get everything to work smoothly
(source).
There are two approaches:
either explicitly set LC_CTYPE=en_US.UTF-8 in /etc/locale.conf,
or modify the Xlib database (which is what add.sh does, if this database exists).
TODO
sudo dnf install glibc-locale-source
# inside the top-level directory of the `locale-en-nl` repository
sudo localedef --no-archive --inputfile=en_NL --charmap=UTF-8 en_NL.UTF-8
The compiled locale files can be found in /usr/lib/locale/en_NL.utf8/.
Examine the generated TXT files with: fldiff nl_NL.txt en_NL.txt fldiff en_US.txt en_NL.txt
In the directory comparison are screenshots of these colored diffs.
These files have been generated with the ./validate.sh script after installation.
List the locales contained in the locale archive file.
localedef --list-archive
Show current settings of the system locale and keyboard mapping.
localectl status
List available locales useful for configuration with set-locale.
localectl list-locales
More details can be viewed with:
cat /etc/default/locale
more /etc/locale.gen
more /etc/locale.alias
The following documentation, sources and tools been used:
- glibc locale
en_US - glibc locale
nl_NL - Locale Helper
en_US - Locale Helper
nl_NL - South African localisations project
- cplusplus Reference strftime
- Linux manual pages strftime(3)
- Linux manual pages locale(1)
- Linux manual pages locale(5)
- Linux manual pages locale(7)
- Linux manual pages localedef(1)
- Linux manual pages lovalectl(1)
- Linux manual pages locale.conf(5)
See also:
- Presentation NLUUG fall 2016 English locale for the Netherlands (en_NL)
- glibc bug 14085 - en_NL: new locale (English language for the Netherlands)
- glibc bug 17823 - gdb CLI cannot recognize floating point numbers if LC_NUMERIC environment variable is set to nl_NL.UTF-8
- glibc bug 22043 - *_NL: add country_isbn
- glibc bug 22473 - Suggestion: Introduce en_EU locale
- glibc bug 22535 - en_DE: New locale
- glibc bug 23857 - Esperanto has no country
The following minor improvements for others locales that still need to be done are:
- replace
tel_dom_fmtinnl_NLlocale from""to"0%a-%l"