added LANG/LC_ALL management functions
authorMichael Gebetsroither <michael.geb@gmx.at>
Mon, 7 Nov 2005 21:22:34 +0000 (22:22 +0100)
committerMichael Gebetsroither <michael.geb@gmx.at>
Mon, 7 Nov 2005 21:22:34 +0000 (22:22 +0100)
sh-lib

diff --git a/sh-lib b/sh-lib
index 640a5b6..437d60c 100644 (file)
--- a/sh-lib
+++ b/sh-lib
@@ -25,6 +25,9 @@ SYSLOG__="YES"
 
 CMD_LINE__=""   # /proc/cmdline
 
+LANG__="$LANG"
+LC_ALL__="$LC_ALL"
+
 
 # CONFIG FUNCTIONS  {{{
 
@@ -34,6 +37,10 @@ function setExitFunction  { EXIT_FUNCTION__="$1"; }
 
 function disableSyslog  { SYSLOG__="NO";  }
 function enableSyslog   { SYSLOG__="YES"; }
+
+function saveLang { LANG__="$LANG"; LC_ALL__="$LC_ALL"; }
+function restoreLang { LANG="$LANG__"; LC_ALL="$LC_ALL__"; }
+function setCLang { saveLang; LANG="C"; LC_ALL="C"; }
 # }}}