NAME

Lingua::Translate::Bing - class to access the function of translation provided by "Bing Translation Api".

VERSION

Version 0.01

SYNOPSIS

use Lingua::Translate::Bing;

my $translator = Lingua::Translate::Bing->new("1111111", "111111");

print $translator->translate("Hello", "ru");
...

CONSTRUCTORS

new($client_id, $client_secret)

$client_id and $client_secret you will must get in http://datamarket.azure.com/dataset/bing/microsofttranslator.

ATTENTION! Microsoft offers free access to Bing Translator for no more than 2,000,000 characters/month.

METHODS

translate($text, $to)

$text

Text, that must will be translated.

$to

Language code. Such as in http://msdn.microsoft.com/en-us/library/hh456380.aspx

initAccessToken()

Returns token from Microsoft OAuth service.

getExistsTokens()

Returns last actual tokens from "tokens.xml" file.

updateToken()

Gets token from Microsoft OAuth service and write it to "tokens.xml".

getAccessToken()

Gets token from "tokens.xml" if it exist. Else update "tokens.xml".

sendRequest($text, $to, $access_token)

$text

Text, that must will be translated.

$to

Language code.

$access_token

Token from Microsoft OAuth service.

AUTHOR

Milovidov Mikhail, <milovidovwork at yandex.ru>

BUGS

Please report any bugs or feature requests to bug-bingtranslationapi at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=BingTranslationApi. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc BingTranslationApi

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2012 Milovidov Mikhail.

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.