Diff for /loncom/localize/lonlocal.pm between versions 1.14 and 1.17

version 1.14, 2003/09/28 02:06:37 version 1.17, 2003/10/02 17:35:57
Line 225  sub current_encoding { Line 225  sub current_encoding {
     }      }
 }  }
   
   # =============================================================== Which locale?
   # Refer to locale -a
   #
   sub current_locale {
       if ($lh) {
    my $enc=$lh->maketext('lang_locale');
    return ($enc eq 'lang_locale'?'':$enc);
       } else {
    return undef;
       }
   }
   
 # ============================================================== Translate hash  # ============================================================== Translate hash
   
 sub texthash {  sub texthash {
Line 265  sub get_language_handle { Line 277  sub get_language_handle {
     if (&Apache::lonnet::mod_perl_version == 1) {      if (&Apache::lonnet::mod_perl_version == 1) {
  $r->content_languages([&current_language()]);   $r->content_languages([&current_language()]);
     }      }
     setlocale(LC_ALL,&current_language.'.'.&current_encoding);  ###    setlocale(LC_ALL,&current_locale);
 }  }
   
   # ==================== Normalize string (reduce fragility in the lexicon files)
   
   # This normalizes a string to reduce fragility in the lexicon files of
   # huge messages (such as are used by the helper), and allow useful
   # formatting: reduce all consecutive whitespace to a single space,
   # and remove all HTML
   sub normalize_string {
       my $s = shift;
       $s =~ s/\s+/ /g;
       $s =~ s/<[^>]+>//g;
       return $s;
   }
 1;  1;
   
 __END__  __END__

Removed from v.1.14  
changed lines
  Added in v.1.17


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>