aboutsummaryrefslogtreecommitdiffstats
path: root/lang.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lang.sh')
-rwxr-xr-xlang.sh50
1 files changed, 28 insertions, 22 deletions
diff --git a/lang.sh b/lang.sh
index 466dcb78..0be0f594 100755
--- a/lang.sh
+++ b/lang.sh
@@ -2,24 +2,23 @@
if [ -f /etc/sysconfig/i18n ]; then
. /etc/sysconfig/i18n
+ [ -n "$LANG" ] && export LANG || unset LANG
+ [ -n "$LC_CTYPE" ] && export LC_CTYPE || unset LC_CTYPE
+ [ -n "$LC_COLLATE" ] && export LC_COLLATE || unset LC_COLLATE
+ [ -n "$LC_MESSAGES" ] && export LC_MESSAGES || unset LC_MESSAGES
+ [ -n "$LC_NUMERIC" ] && export LC_NUMERIC || unset LC_NUMERIC
+ [ -n "$LC_MONETARY" ] && export LC_MONETARY || unset LC_MONETARY
+ [ -n "$LC_TIME" ] && export LC_TIME || unset LC_TIME
+ [ -n "$LC_ALL" ] && export LC_ALL || unset LC_ALL
+ [ -n "$LANGUAGE" ] && export LANGUAGE || unset LANGUAGE
+ [ -n "$LINGUAS" ] && export LINGUAS || unset LINGUAS
- if [ -n "$LANG" ]; then
- export LANG
- fi
-
- if [ -n "$LC_ALL" ]; then
- export LC_ALL
- fi
-
- if [ -n "$LINGUAS" ]; then
- export LINGUAS
- fi
-
+ # deprecated
if [ -n "$SYSTERM" ]; then
export TERM=$SYSTERM
fi
- # Set console font map.
+ # Set console font map, but should be loaded by font.
if [ -n "$UNIMAP" ]; then
loadunimap $UNIMAP
fi
@@ -38,15 +37,22 @@ if [ -f /etc/sysconfig/i18n ]; then
;;
esac
fi
-
- if [ -n "$SYSTERM" ] ; then
- case $SYSTERM in
- linux-lat)
- LESSCHARSET=latin1
- INPUTRC=/etc/inputrc
- export LESSCHARSET INPUTRC
- ;;
- esac
+
+ if [ -n "$INPUTRC" ]; then
+ export INPUTRC
+ elif [ "$TERM" = "linux-lat" ]; then
+ INPUTRC=/etc/inputrc
+ export INPUTRC
+ fi
+
+ if [ -n "$LESSCHARSET" ]; then
+ export LESSCHARSET
+ elif [ "$TERM" = "linux-lat" ]; then
+ LESSCHARSET=latin1
+ export LESSCHARSET
fi
+
+ [ -n "$_XKB_CHARSET" ] && export _XKB_CHARSET || unset _XKB_CHARSET
+
unset SYSFONTACM
fi