Friday, June 17, 2011

Example of Translating in Perl with WWW::Babelfish

#!/opt/local/bin/perl -w

use strict;
use warnings;

use WWW::Babelfish;

$obj = new WWW::Babelfish(service => Babelfish, agent => Mozilla/8.0, proxy => "");
die("Babelfish server unavailable\n") unless defined($obj);
$it_text = $obj->translate(
   'source'      => 'Italian',
   'destination' => 'German',
   'text'        => 'Questo serve solo per testare',
   'delimiter'   => "\n",
);
print $it_text;

Take a Look..

 

Bloogger Blogger, Google Blogger, Google Google

Linux Install VMWare Tools Linux Mint 12