The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

REST::Google::Translate2 - OO interface to Google Translate API v2

VERSION

Version 1.08

SYNOPSIS

    use REST::Google::Translate2;

    REST::Google->http_referer('http://example.com/');

    my $res = REST::Google::Translate2->new(
        q => 'hello world',
        source => 'en',
        target => 'it',
        key => $Your_Google_API_Key
    );
    die "response status failire" if $res->responseStatus != 200;

    my $translated = $res->responseData->translatedText;
    printf "Italian translation: %s\n", $translated;

DESCRIPTION

REST::Google::Translate2 is an update to Eugen Sobchenko's REST::Google::Translate module that works with the Google Translate API v2. Version 1 of this API has been unavailable since late 2011.

SEE ALSO

REST::Google - the base class for this module

REST::Google::Translate - earlier version of this module.

AUTHOR

Marty O'Brien, <mob at cpan.org>

Eugen Sobchenko <ejs at cpan.org>

LICENSE AND COPYRIGHT

Copyright 2012, Marty O'Brien. Copyright 2008, Eugen Sobchenko.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.