aboutsummaryrefslogtreecommitdiffstats
path: root/lang.sh
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-04-23 14:07:26 -0400
committerBill Nottingham <notting@redhat.com>2008-04-23 14:07:26 -0400
commit37638eda01ac8743d6dbd85f1d699619571432a0 (patch)
treeb651b70de78e26f6209e80619764a56144bedbd4 /lang.sh
parentb8fbfde343e39337bcbddc33cab0bc30ee4fb0e3 (diff)
downloadinitscripts-37638eda01ac8743d6dbd85f1d699619571432a0.tar
initscripts-37638eda01ac8743d6dbd85f1d699619571432a0.tar.gz
initscripts-37638eda01ac8743d6dbd85f1d699619571432a0.tar.bz2
initscripts-37638eda01ac8743d6dbd85f1d699619571432a0.tar.xz
initscripts-37638eda01ac8743d6dbd85f1d699619571432a0.zip
There is no more GDM_LANG - handle pre-existing LANG (#372151, <rstrode@redhat.com>)
Diffstat (limited to 'lang.sh')
-rwxr-xr-xlang.sh21
1 files changed, 7 insertions, 14 deletions
diff --git a/lang.sh b/lang.sh
index 62364d06..705e7a58 100755
--- a/lang.sh
+++ b/lang.sh
@@ -2,22 +2,15 @@
sourced=0
-if [ -n "$LANG" ]; then
- sourced=1
-else
- for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do
- [ -f $langfile ] && . $langfile && sourced=1
- done
-fi
+saved_lang="$LANG"
+for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do
+ [ -f $langfile ] && . $langfile && sourced=1
+done
-if [ -n "$GDM_LANG" ]; then
- sourced=1
- LANG="$GDM_LANG"
- unset LANGUAGE
- if [ "$GDM_LANG" = "zh_CN.GB18030" ]; then
- export LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
- fi
+if [ -n "$saved_lang" ]; then
+ LANG="$saved_lang"
fi
+unset saved_lang
if [ "$sourced" = 1 ]; then
[ -n "$LANG" ] && export LANG || unset LANG