View | Details | Raw Unified | Return to bug 7445
Collapse All | Expand All

(-)a/C4/Search.pm (-1 / +7 lines)
Lines 733-738 sub _build_stemmed_operand { Link Here
733
733
734
# FIXME: the locale should be set based on the user's language and/or search choice
734
# FIXME: the locale should be set based on the user's language and/or search choice
735
    #warn "$lang";
735
    #warn "$lang";
736
    # Make sure we only use the first two letters from the language code
737
    $lang = lc(substr($lang, 0, 2));
738
    # The language codes for the two variants of Norwegian will now be "nb" and "nn",
739
    # none of which Lingua::Stem::Snowball can use, so we need to "translate" them
740
    if ($lang eq 'nb' || $lang eq 'nn') {
741
      $lang = 'no';
742
    }
736
    my $stemmer = Lingua::Stem::Snowball->new( lang => $lang,
743
    my $stemmer = Lingua::Stem::Snowball->new( lang => $lang,
737
                                               encoding => "UTF-8" );
744
                                               encoding => "UTF-8" );
738
745
739
- 

Return to bug 7445