Locale settings
Locale settings control how Linux presents language-dependent things: the language of prompts and error messages, how dates, numbers and currency are formatted, and how "special" characters are handled.
Because Anunna is used by people with many different backgrounds, the cluster sets no default locale — the operating system's own defaults apply, so everything works out of the box. If you want different behaviour, set your preferred locale yourself. Put the settings in your ~/.bashrc, and also inside any job scripts, since scripts do not normally read your ~/.bashrc.
Seeing the current settings
To list the locale categories and the value each currently uses:
locale
To list the locales available on the system:
locale -a
To see the detailed keywords of one category (for example monetary formatting):
locale -k LC_MONETARY
There are two kinds of setting: LANG, the overall default, and the individual LC_* category variables (such as LC_NUMERIC or LC_TIME) that override LANG for one category each.
Changing your locale
Set LANG (and optionally LC_ALL, which forces every category at once):
export LANG=nl_NL.utf8
export LC_ALL=nl_NL.utf8
After this you would get error messages in Dutch and the euro sign as the currency symbol.
Note that LC_ALL overrides everything else, so leave it unset if you want to mix categories (see below).
Mixing categories
A common wish is to mix locales — for example English-language messages but Danish date and number formatting (which gives unambiguous YYYY-MM-DD dates), with an Irish locale for the decimal separator so numbers use a dot. Because LC_ALL overrides individual categories, first clear it, set a base for all categories, then override the few you want:
# LC_ALL overrides per-category settings, so clear it first
unset LC_ALL
# Set every category to English with Danish conventions (e.g. correct dates)
for item in $(locale | grep LC | grep -v LC_ALL | cut -f1 -d'='); do
export ${item}=en_DK.UTF-8
done
# Override numeric and monetary formatting to get a dot as the decimal separator
export LC_NUMERIC=en_IE.utf8
export LC_MONETARY=en_IE.utf8
With that in place, locale reports a mixed setup like:
LANG=en_IE.UTF-8
LANGUAGE=
LC_CTYPE=en_DK.UTF-8
LC_NUMERIC=en_IE.UTF-8
LC_TIME=en_DK.UTF-8
LC_COLLATE=en_DK.UTF-8
LC_MONETARY=en_IE.UTF-8
LC_MESSAGES=en_DK.UTF-8
LC_PAPER=en_DK.UTF-8
LC_NAME=nl_NL.utf8
LC_ADDRESS=nl_NL.utf8
LC_TELEPHONE=nl_NL.utf8
LC_MEASUREMENT=en_DK.UTF-8
LC_IDENTIFICATION=en_DK.UTF-8
LC_ALL=