From: Mattia B. <mb...@ds...> - 2002-12-12 21:38:59
|
On Thu, 12 Dec 2002 21:57:33 +0100 Marcus <li...@wo...> wrote: > Thursday, December 12, 2002, 4:58:19 PM, you wrote: > > I was thinking of reading the system language and setting > that, but still allowing to change the locale via a menu. > The big question is how do you set the locale before > creating the whole app? > Do you set the locale before frame creation, or do you need > an app first. Well, why don't you set it in MyApp::OnInit, before creating the frame? > > Can anybody explain this line from the demo, particularly > the variable. > Or write it in a longer form? > > [ map { Wx::GetTranslation( ${$_}[0] ) } @locales ] ); my @array; foreach my $i ( @locales ) { push @array, $i->[0]; } # then take a reference to the array and pass it to dialog ctor > and this one: > init_locale( @{$locales[ $dialog->GetSelection ]} ); my $index = $dialog->GetSelection(); my $array_ref = $locales[$index]; my @array = @$array_ref; > It looks deeply "Perlish" :-) FWIW: ${$var}{foo} -> $var->{foo} > Still confused, but getting close, I hope this gets you "there" :-) Regards Mattia |