<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">WebService::Google::Language
============================

WebService::Google::Language is an object-oriented interface to the
Google AJAX Language API (http://code.google.com/apis/ajaxlanguage/).

The AJAX Language API is a web service to translate and detect the language
of blocks of text.


SYNOPSIS

    use WebService::Google::Language;

    $service = WebService::Google::Language-&gt;new(
      'referer' =&gt; 'http://example.com/',
      'src'     =&gt; '',
      'dest'    =&gt; 'en',
    );

    $result = $service-&gt;translate('Hallo Welt');
    if ($result-&gt;error) {
      printf "Error code: %s\n", $result-&gt;code;
      printf "Message:    %s\n", $result-&gt;message;
    }
    else {
      printf "Detected language: %s\n", $result-&gt;language;
      printf "Translation:       %s\n", $result-&gt;translation;
    }

    $result = $service-&gt;detect('Bonjour tout le monde');
    printf "Detected language: %s\n", $result-&gt;language;
    printf "Is reliable:       %s\n", $result-&gt;is_reliable ? 'yes' : 'no';
    printf "Confidence:        %s\n", $result-&gt;confidence;


INSTALLATION

To install this module, run the following commands:

    perl Makefile.PL
    make
    make test
    make install


DEPENDENCIES

This module requires these other modules:

    Carp
    JSON 2.0+
    LWP::UserAgent
    Test::More     (required by "make test")
    URI::Escape


DOCUMENTATION

After installing, you can find documentation for this module with
the perldoc command:

    perldoc WebService::Google::Language


COPYRIGHT AND LICENCE

Copyright 2008 Henning Manske, all rights reserved.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
</pre></body></html>