From 4f02c8355ef866b5273c83fa9677a364450c2367 Mon Sep 17 00:00:00 2001 From: tfheen Date: Mon, 16 Jun 2003 18:25:36 +0000 Subject: [PATCH] try setting lang from available locales using localedef if locale -a fails. git-svn-id: file:///svn/tfheen/trunk/dotfiles@162 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- environment | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/environment b/environment index 54e9b1d..16527ce 100644 --- a/environment +++ b/environment @@ -34,7 +34,7 @@ LESS="-m" RSYNC_RSH=ssh CVS_RSH=ssh PILOTRATE=115200 -PILOTPORT=/dev/tts/0 +PILOTPORT=/dev/usb/tts/0 #MAIL=/var/spool/mail/tfheen DEBEMAIL=tfheen@debian.org DEBFULLNAME="Tollef Fog Heen" @@ -64,6 +64,19 @@ if type -p locale > /dev/null 2>&1; then fi fi +if [ -z "$LANG" ]|| [ "$LANG" = "C" ]; then + if type -p localedef > /dev/null 2>&1; then + localedef --list-archive > /dev/null 2>&1 + if test "$?" = "0"; then + if localedef --list-archive | grep -q '^no_NO$' ; then + LANG=no_NO + elif localedef --list-archive | grep -q '^en_US$'; then + LANG=en_US + fi + fi + fi +fi + case "$DOMAINNAME" in idi.ntnu.no|stud.ntnu.no) XTERM=Eterm -- 2.39.5