]> arthur.barton.de Git - ConfigScripts.git/commitdiff
Implement "intelligent" locale setting
authorAlexander Barton <alex@barton.de>
Mon, 23 Mar 2009 21:51:24 +0000 (22:51 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 23 Mar 2009 21:51:24 +0000 (22:51 +0100)
Set the locale if it is not set or doesn't contain a dot;
but all system messages should still be in "native" ("C") language.

sys/profile

index 9920eb12d028a600e7c3fab88c42d43464784ea5..ef07918d2ae1041c2ee687b30004e4de288991e0 100644 (file)
@@ -9,6 +9,11 @@
 PROFILEREAD="true"
 export PROFILEREAD
 
+# Set locale if it is not set or doesn't contain a dot;
+# but all system messages should still be in "native" ("C") language.
+[ "$LANG" = "${LANG#*.}" ] && export LANG="${LANG:-de_DE}.ISO8859-1"
+export LC_MESSAGES="C"
+
 # Initialize PATH variable
 export PATH MANPATH
 if [ -x /usr/libexec/path_helper ]; then