Wilbert's website at SocSci

has a subtitle

computer/isoLinux.php 2016-07-13

ISO Linux

background

Using international standards (ISO 216 for paper sizes, ISO 8601 for date and time format, ISO 80 000 for units and numbers) used to be done with an impressive number of KDE tabs and settings. Starting from Plasma 5, a more stardard approach is followed. You should install a locale of your liking.

You may think a simple export LC_ALL=en_DK.UTF-8 would do the trick, but this is not the case, unfortunately. First reason is that it will not do for most people. Most likely you do not want your currency symbol set to DKK if you write English texts, you may not want your decimal separator to be the comma. Second reason is that it simply does not follow all the ISO standards that I want followed. ISO 80&thinspace;000 does not allow dots as thousands separator.

That's why I created a locale that is a bit more metric, a bit more English and a bit more Dutch than en_DK. I call it en_NL. This is how to install it on Kubuntu. Other Linux flavours differ only little:

Installation

  • Download en_NL
  • Copy it to the proper location. Go to your downloads directory and:
    sudo cp en_NL /usr/share/i18n/locales/
  • Add it to the list of generatable locales
    sudo sh -c 'echo "en_NL UTF-8" >> /usr/share/i18n/SUPPORTED'
  • Generate it
    sudo locale-gen en_NL 

Now the locale is usable. Use it:

  • For Ubuntu:
    sudo sh -c 'echo "LANG=en_NL.UTF-8" > /etc/default/locale'
  • For KDE4:
    echo "export LANG=en_NL.UTF-8" >> ~/.kde/env/locale.sh
  • For KDE5, for gtk programs:
    echo "export LANG=en_NL.UTF-8" >> ~/.config/plasma-workspace/env/locale.sh

    Unfortunately Qt and KDE programs won't use it since KDE5 only supports the Qt locales which are based on Common Locale Data Repository v2.0 and no international standards are in this list.
  • For Ubuntu Unity:

You must log in again before it will work.

Content

This is the (unescaped) text of the locale:

escape_char /
comment_char %

% English language locale for The Netherlands
%
% Written according to POSIX.2
% ISO/IEC 9945-2:1993 specifications
%
% Using the English language in The Netherlands with a maximum use of 
% ISO standards (eg 216, 8601, 10 646 and 80 000) 
% This locale uses a period as decimal dot and observes 
% ISO standards in a stricter sense than en_DK does.
% Except for a few typical Dutch or European settings
% this locale is suitable for the whole English speaking world.

LC_IDENTIFICATION
title      "English locale for The Netherlands"
source     "Wilbert van Ham"
address    ""
contact    ""
email      "wilbert.vanham@gmail.com"
tel        ""
fax        ""
language   "English"
territory  "Netherlands"
revision   "0.2"
date       "2016-03-18"
%
category  "en_NL";LC_IDENTIFICATION
category  "en_NL";LC_CTYPE
category  "en_NL";LC_COLLATE
category  "en_NL";LC_TIME
category  "en_NL";LC_NUMERIC
category  "en_NL";LC_MONETARY
category  "en_NL";LC_MESSAGES
category  "en_NL";LC_PAPER
category  "en_NL";LC_NAME
category  "en_NL";LC_ADDRESS
category  "en_NL";LC_TELEPHONE
category  "en_NL";LC_MEASUREMENT

END LC_IDENTIFICATION

LC_COLLATE
copy "iso14651_t1"
END LC_COLLATE

LC_CTYPE
copy "i18n"

translit_start
include "translit_combining";""
translit_end
END LC_CTYPE

% Following the 9th CGPM (1948, Resolution 7) and the 22nd CGPM (2003,
% Resolution 10), for numbers with many digits the digits may be divided into groups
% of three by a thin space, in order to facilitate reading. Neither dots nor commas are
% inserted in the spaces between groups of three.
LC_MONETARY
int_curr_symbol           "EUR "
currency_symbol           ""
mon_decimal_point         "."
mon_thousands_sep         ""
mon_grouping              3;3
positive_sign             ""
negative_sign             "-"
int_frac_digits           2
frac_digits               2
p_cs_precedes             1
p_sep_by_space            1
n_cs_precedes             1
n_sep_by_space            1
p_sign_posn               1
n_sign_posn               2
END LC_MONETARY

LC_NUMERIC
decimal_point "."
thousands_sep ""
grouping 3;3
END LC_NUMERIC

LC_TIME
abday "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
day   "Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";"Friday";"Saturday"
abmon "Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"
mon   "January";"February";"March";"April";"May";"June";"July";"August";"September";"October";"November";"December"
% date formats following ISO 8601-1988
d_t_fmt  "%Y-%m-%dT%T %Z"
d_fmt    "%Y-%m-%d"
t_fmt    "%T"
am_pm    "";""
t_fmt_ampm  ""
date_fmt "%a %b %e %H:%M:%S %Z %Y"
week    7;19971130;4
first_weekday 2
first_workday 2
END LC_TIME

LC_MESSAGES
yesexpr "^[yY].*"
noexpr "^[nN].*"
yesstr ""
nostr ""
END LC_MESSAGES

LC_PAPER
height 297
width 210
END LC_PAPER

LC_TELEPHONE
tel_int_fmt    "+%c %a %l"
int_prefix     "31"
int_select     "00"
END LC_TELEPHONE

LC_MEASUREMENT
measurement 1
END LC_MEASUREMENT

LC_NAME
name_fmt    "%s%t%g%t%m%t%f"
name_miss   "Miss."
name_mr     "Mr."
name_mrs    "Mrs."
name_ms     "Ms."
name_gen    "Dear Sir/Madam"
END LC_NAME

LC_ADDRESS
postal_fmt    "%f%N%a%N%d%N%b%N%s %h %e %r%N%z %T%N%c%N"
country_ab2 "NL"
country_ab3 "NLD"
country_num 528
country_car "NL"
country_isbn "97"
country_post ""
country_name ""
lang_name "English"
lang_ab "en"
lang_term "eng"
lang_lib "eng"
END LC_ADDRESS