summaryrefslogtreecommitdiff
path: root/libre/filesystem/locale.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libre/filesystem/locale.sh')
-rw-r--r--libre/filesystem/locale.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/libre/filesystem/locale.sh b/libre/filesystem/locale.sh
index 3cfc89c1b..b66587203 100644
--- a/libre/filesystem/locale.sh
+++ b/libre/filesystem/locale.sh
@@ -1,14 +1,13 @@
#!/bin/sh
-unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES \
- LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION
-
-if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
- . "$XDG_CONFIG_HOME/locale.conf"
-elif [ -n $HOME ] && [ -r $HOME/.config/locale.conf ]; then
- . "$HOME/.config/locale.conf"
-elif [ -r /etc/locale.conf ]; then
- . /etc/locale.conf
+if [ -z "$LANG" ]; then
+ if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
+ . "$XDG_CONFIG_HOME/locale.conf"
+ elif [ -n $HOME ] && [ -r $HOME/.config/locale.conf ]; then
+ . "$HOME/.config/locale.conf"
+ elif [ -r /etc/locale.conf ]; then
+ . /etc/locale.conf
+ fi
fi
LANG=${LANG:-C}