我们已经安装了 Lingua::Translate 并按如下方式使用它
#!/usr/bin/perl
use Lingua::Translate;
my $trans = Lingua::Translate->new
(back_end => 'Babelfish',
src => "en",
dest => "it",);
print $trans->translate("Hello world");
执行此操作会导致以下错误:
Translation back-end failed; Request timed out more than 2 times (Request 1:301 Moved Permanently; Request 2:301 Moved Permanently; Request 3:301 Moved Permanently; ) at /usr/local/share/perl/5.10.1/Lingua/Translate/Babelfish.pm line 206.