diff options
-rwxr-xr-x | lang.csh | 8 | ||||
-rwxr-xr-x | lang.sh | 11 |
2 files changed, 14 insertions, 5 deletions
@@ -1,12 +1,16 @@ # /etc/profile.d/lang.csh - set i18n stuff set sourced=0 -foreach file (/etc/sysconfig/i18n $HOME/.i18n) +if ($?LANG) then + set sourced=1 +else + foreach file (/etc/sysconfig/i18n $HOME/.i18n) if ( -f $file ) then eval `grep -v '^[:blank:]*#' $file | sed 's|\([^=]*\)=\([^=]*\)|setenv \1 \2|g' | sed 's|$|;|'` endif set sourced=1 -end + end +endif if ($?GDM_LANG) then set sourced=1 @@ -1,9 +1,14 @@ # /etc/profile.d/lang.sh - set i18n stuff sourced=0 -for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do - [ -f $langfile ] && . $langfile && sourced=1 -done + +if [ -n "$LANG" ]; then + sourced=1 +else + for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do + [ -f $langfile ] && . $langfile && sourced=1 + done +fi if [ -n "$GDM_LANG" ]; then sourced=1 |