NAME
Bing::Translate - Class for using the functions, provided by the Microsoft Bing Translate API.
VERSION
version 0.003
SYNOPSIS
use Bing::Translate;
my $srcText = "胖達人昨起受理退費";
my $translator = Bing::Translate->new('Your client id', 'Your client secret');
my $result = $translator->translate("$srcText", "zh-CHT", "en");
print "$result\n";
DESCRIPTION
This is an implementation of the Microsoft Translator (Bing Translator) API.
CONSTRUCTORS
new($client_id, $client_secret)
This is the constructor. Options are as follows:
Client ID (required)
Your Application client ID on the Windows Azure Marketplace
Client secret (required)
Your Application client secret on the Windows Azure Marketplace
If you don't know how to do this, you can see : http://blogs.msdn.com/b/translation/p/gettingstarted1.aspx
METHODS
translate("source text", "from language code", "to language code")
my $result = $translator->translate("$srcText", "zh-CHT", "en");
This method reads source text and send to Bing translate server, it process the Access Token then get the translated result. The language code reference : http://msdn.microsoft.com/en-us/library/hh456380.aspx
AUTHOR
Meng-Jie Wang <taiwanwolf.iphone@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Meng-Jie Wang.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 112:
Non-ASCII character seen before =encoding in '"胖達人昨起受理退費";'. Assuming UTF-8