Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Google Translator -> wxPerl frontend

by Anonymous Monk
on Oct 04, 2010 at 12:06 UTC ( #863324=note: print w/ replies, xml ) Need Help??


in reply to Re: Google Translator -> wxPerl frontend
in thread Google Translator -> wxPerl frontend

LWP::Online - Does your process have access to the web


Comment on Re^2: Google Translator -> wxPerl frontend
Replies are listed 'Best First'.
Re^3: Google Translator -> wxPerl frontend
by Swalif (Scribe) on Oct 08, 2010 at 15:43 UTC
    Since only Lingua::Translate->new( src => $tag_1, dest => $tag_2 ) needs connection... how about:
    my ($message, $trans); my $tag_1 = getTag($self->{origin}->GetValue()); my $tag_2 = getTag($self->{destination}->GetValue()); eval { $object = Lingua::Translate->new( src => $tag_1, dest => $tag_2 ) + or die "Cannot Create an instance"; $message = $self->{origin_text}->GetValue(); $trans = $object->translate($message); }; if ($@){$self->{translated_text}->SetValue("An Error occured : $@ + \n Perhaps your not online."); } else{ $self->{translated_text}->SetValue($trans); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://863324]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2015-07-30 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls