Diff for /loncom/interface/lonspeller.pm between versions 1.3 and 1.4

version 1.3, 2004/07/22 20:19:20 version 1.4, 2004/07/22 23:50:55
Line 35  use Apache::lonlocal; Line 35  use Apache::lonlocal;
 use strict;  use strict;
 my $speller;  my $speller;
   
   sub spellcheck_language {
       if ($ENV{'form.lang'}) { return $ENV{'form.lang'}; }
       if (&mt('spellcheck_lang') ne 'spellcheck_lang') {
    return &mt('spellcheck_lang');
       }
       return 'en_US';
   }
   
   sub set_language {
       my $lang=&spellcheck_language();
       $speller->set_option('lang',$lang);
   }
   
 sub markeduptext {  sub markeduptext {
     my $input=shift;      my $input=shift;
     my $output='';      my $output='';
       &set_language();
     foreach my $word (split(/\W+/,$input)) {      foreach my $word (split(/\W+/,$input)) {
  if ($speller->check($word)) {   if ($speller->check($word)) {
     $output.=$word.' ';      $output.=$word.' ';

Removed from v.1.3  
changed lines
  Added in v.1.4


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