]> git.wh0rd.org Git - home.git/commitdiff
autoselect available locales
authorMike Frysinger <vapier@gentoo.org>
Wed, 18 Feb 2009 22:28:00 +0000 (17:28 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:07 +0000 (15:36 -0400)
.profile.d/locale.sh

index 6536b5a37bf3c2db535a714bf48672bf4f2040de..c9bbd4cd0843463c4a6170fcab040fdafb3be9da 100644 (file)
@@ -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