Hi,

  default_messages don't seem to work:

-----------

<h1>*** [= Heading =] ***</h1>
<h1>*** [= Submit =] ***</h1>

-----------

would print correct thing with test.html?lang=en but only

*** Hlavicka ***

*** ***

when test.html?lang=cz

It looks like defauly messages are completely ignored. app file included below

- Robert


-----------

@ISA = ('Embperl::App') ;

sub init {
        my $self = shift ;
        my $r = $self->curr_req ;
        my $fdat = $r->thread->form_hash;        
        my $lang = $fdat->{lang} || 'en' ;
#   my %messages = %{ do '/home/www/phl/etc/dict/dict.dump' };
    my %messages =
        (
        'cz' =>
            {
            'Heading' => 'Hlavicka',
            'Submit'  => undef,
            },
        'en' =>
            {
            'Heading' => 'Heading',
            'Submit'  => 'Submit',
            },
        ) ;
        
        push @{$r->messages}, $messages{$lang} ;
        push @{$r->default_messages}, $messages{'en'} if ($lang ne 'en') ;

    return 0;

}
 
1 ;

Reply via email to