Commit 1c1e450a authored by Christopher R. Gabriel's avatar Christopher R. Gabriel
Browse files

export also LC_MESSAGES, and align LANGUAGE with LANG

parent b35756a5
#!/bin/sh
# workaround for session language selection in lightdm greeter
# we need this only if lightdm is being used
if pidof lightdm
then
# use Language setting from ~/.dmrc
export LANG=`cat "$HOME/.dmrc" | grep '^Language=' | cut -d '=' -f 2- | sed 's/utf8/UTF-8/'`
if pidof lightdm; then
if [ -e $HOME/.dmrc ]; then
# use Language setting from ~/.dmrc
export LANG=`cat "$HOME/.dmrc" | grep '^Language=' | cut -d '=' -f 2- | sed 's/utf8/UTF-8/'`
# if $LANGUAGE is set, sync it with chosen locale
[ -n "$LANGUAGE" ] && export LANGUAGE=`echo $LANG | cut -d '.' -f 1`:`echo -n $LANG | cut -d '.' -f 1 | cut -d '_' -f 1`
# remove untrustworthy $GDM_LANG
[ -n "$GDM_LANG" ] && unset GDM_LANG
fi
\ No newline at end of file
# if $LANGUAGE is set, sync it with chosen locale
[ -n "$LANGUAGE" ] && export LANGUAGE=$LANG
# align LC_MESSAGES too
export LC_MESSAGES=$LANG
# remove untrustworthy $GDM_LANG
[ -n "$GDM_LANG" ] && unset GDM_LANG
fi
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment