Skip to main content.
home | support | download

Back to List Archive

Re: Configuration of the example CGI (swish.cgi)

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Wed Mar 26 2003 - 18:01:29 GMT
On Wed, 26 Mar 2003, Tajoli Zeno wrote:

> If I change the two line
>      my $string = '<br>Limit to: '
>                   . ( $fields{buttons} ? "$fields{buttons}<br>" : '' )
> 
> with
>      my $string = '<br> Limita ad: '
>           . '<input type="radio" name="DateRanges_date_option" value="All" 
> />Non limitare'
>           .'<input type="radio" name="DateRanges_date_option" value="Today" 
> />Oggi'
>           .'<input type="radio" name="DateRanges_date_option" 
> value="Yesterday" />Ieri'
>           .'<input type="radio" name="DateRanges_date_option" value="This 
> Week" />Questa settimana<br>'
> 
> I recive a good results (for my italian users).

I'm terribly sorry for the lack of language support.

Look at example/modules/SWISH/DateRanges.pm  That's where is should be
changed.  

    my %Num_to_label;
    my %Label_to_num;
    my $i = 1;
    for ( @TIME_PERIODS ) {
        my $label = $_;
        $label =~ s/ /&nbsp;/g;
        $Num_to_label{$i} = $label;
        $Label_to_num{$_} = $i++;
    }

the @TIME_PERIODS probably should stay English, but then instead of
mapping directly to those map to Italian.

Also there's a @months array that should be updated.

That module was a quick hack, so any updates are welcome.


-- 
Bill Moseley moseley@hank.org
Received on Wed Mar 26 18:02:22 2003