Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^3: Google Translator -> wxPerl frontend

by Swalif (Scribe)
on Oct 08, 2010 at 15:43 UTC ( #864218=note: print w/ replies, xml ) Need Help??

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

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); }

Comment on Re^3: Google Translator -> wxPerl frontend
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-11-30 20:29 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (782 votes), past polls