Neaten up and label the locale settings

This commit is contained in:
Anthony Rose 2020-06-22 22:57:15 +01:00
parent 973d899a15
commit d767e2b60f

View file

@ -46,39 +46,31 @@ set -o noclobber
# Locale and language. # Locale and language.
## Clear the existing locale settings and set options I always want. ## Clear the existing locale settings and set options I always want.
export LC_ALL= export LC_ALL=''
export TIME_STYLE="long-iso" export TIME_STYLE="long-iso" # Used by GNU 'ls'.
## Set the default language.
export LANG="en_GB.UTF-8"
export LANGUAGE="en_GB:en"
## Use French if that is set as the system locale. ## Use French if that is set as the system locale.
if [ -r /etc/default/locale ] && [ $(. /etc/default/locale; echo $LANG) = "fr_FR.UTF-8" ]; then if [ -r /etc/default/locale ] && [ $(. /etc/default/locale; echo $LANG) = "fr_FR.UTF-8" ]; then
export LANG="fr_FR.UTF-8" export LANG="fr_FR.UTF-8"
export LANGUAGE="fr_FR:fr" export LANGUAGE="fr_FR:fr"
export LC_COLLATE="fr_FR.UTF-8"
export LC_CTYPE="fr_FR.UTF-8"
export LC_IDENTIFICATION="fr_FR.UTF-8"
export LC_MEASUREMENT="fr_FR.UTF-8"
export LC_MESSAGES="fr_FR.UTF-8"
export LC_NAME="fr_FR.UTF-8"
export LC_NUMERIC="fr_FR.UTF-8"
export LC_TIME="fr_FR.UTF-8"
else
## Fall back to British English.
export LANG="en_GB.UTF-8"
export LANGUAGE="en_GB:en"
export LC_COLLATE="en_GB.UTF-8"
export LC_CTYPE="en_GB.UTF-8"
export LC_IDENTIFICATION="en_GB.UTF-8"
export LC_MEASUREMENT="en_GB.UTF-8"
export LC_MESSAGES="en_GB.UTF-8"
export LC_NAME="en_GB.UTF-8"
export LC_NUMERIC="en_GB.UTF-8"
export LC_TIME="en_GB.UTF-8"
fi fi
## These defaults depend on my physical location. ## Set the other language options to ${LANG}.
export LC_ADDRESS="en_GB.UTF-8" export LC_COLLATE="$LANG" # Alphabetic sorting.
export LC_MONETARY="en_GB.UTF-8" export LC_CTYPE="$LANG" # Interpretation of byte sequences.
export LC_PAPER="en_GB.UTF-8" export LC_IDENTIFICATION="$LANG" # Locale metadata (GNU).
export LC_TELEPHONE="en_GB.UTF-8" export LC_MEASUREMENT="$LANG" # Units of measure -- metric/imperial (GNU).
export PAPERSIZE="a4" export LC_MESSAGES="$LANG" # Language that messages are displayed in.
export LC_NAME="$LANG" # Salutations and titles (GNU).
export LC_NUMERIC="$LANG" # Formatting for non-monetary numbers.
export LC_TIME="$LANG" # Time format.
## These should be set to the physical location.
export LC_ADDRESS="en_GB.UTF-8" # Postal address (GNU).
export LC_MONETARY="en_GB.UTF-8" # Currency display.
export LC_PAPER="en_GB.UTF-8" # Standard paper size -- A4 or Letter (GNU).
export LC_TELEPHONE="en_GB.UTF-8" # Formats for telephone services (GNU).
export PAPERSIZE="a4" # Default paper size (GhostScript).
# Other exports. # Other exports.
export ANSIBLE_NOCOWS=1 export ANSIBLE_NOCOWS=1