archrelease: copy trunk to extra-x86_64
[arch-packages.git] / filesystem / trunk / locale.sh
blob48dd748da7cbce75910016c1472c556f80385b4f
1 #!/bin/sh
3 # load locale.conf in XDG paths.
4 # /etc/locale.conf loads and overrides by kernel command line is done by systemd
5 # But we override it here, see FS#56688
6 if [ -z "$LANG" ]; then
7 if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
8 . "$XDG_CONFIG_HOME/locale.conf"
9 elif [ -n "$HOME" ] && [ -r "$HOME/.config/locale.conf" ]; then
10 . "$HOME/.config/locale.conf"
11 elif [ -r /etc/locale.conf ]; then
12 . /etc/locale.conf
16 # define default LANG to C if not already defined
17 LANG=${LANG:-C}
19 # export all locale (7) variables when they exist
20 export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
21 LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \
22 LC_IDENTIFICATION