From: Mike Frysinger Date: Wed, 18 Feb 2009 22:28:00 +0000 (-0500) Subject: autoselect available locales X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=bc1f768f7fa171ff58ecd840f61741a55304ea66;p=home.git autoselect available locales --- diff --git a/.profile.d/locale.sh b/.profile.d/locale.sh index 6536b5a..c9bbd4c 100644 --- a/.profile.d/locale.sh +++ b/.profile.d/locale.sh @@ -1,5 +1,9 @@ case ${TERM} in Eterm) LANG="en_US";; - *) LANG="en_US.UTF8";; + *) + for LANG in en_US.UTF8 en_US.UTF-8 "" ; do + locale | grep -q "^LC.*${LANG}" && break + done + ;; esac export LANG