Reputation: 95
We've installed Lingua::Translate and used it as follows
#!/usr/bin/perl
use Lingua::Translate;
my $trans = Lingua::Translate->new
(back_end => 'Babelfish',
src => "en",
dest => "it",);
print $trans->translate("Hello world");
Excuting this results in the following error:
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.
Upvotes: 1
Views: 310
Reputation: 4416
I suspect that this has to do with the fact that http://babelfish.yahoo.com/ now redirects to http://www.microsofttranslator.com/. I have no idea whether the underlying engine has changed. I would check CPAN to see if there's an updated version of Lingua::Translate, or check the perldoc to see if the URL is configurable within a given back end.
This has happened before: see this bug report.
Based on that patch, it looks like you may be able to add babelfish_uri as one of the hash elements passed to Lingua::Translate->new(). This isn't in the documentation, it's just an educated guess.
Upvotes: 3