library translator
Provides translation clients for a few known translation providers
dhensen/translator
Provides translation clients for a few known translation providers
- Monday, July 20, 2015
- by dhensen
- Repository
- 1 Watchers
- 0 Stars
- 4 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
translator
Provides translation clients for a few known translation services. At this moment supports:
- Bing/Microsoft Azure Translator, (*1)
Installation
composer require dhensen/translator
Usage
Bing/Azure:, (*2)
$browser = new \Buzz\Browser();
$azureClientId = 'your_microsoft_azure_client_id';
$azureClientSecret = 'your_microsoft_azure_client_secret';
$translator = new \DHensen\Translator\Bing\BingTranslator($browser, $azureClientId, $azureClientSecret);
echo $translator->translate('nl', 'en', 'Ik eet soep'); // prints: I eat soup
Google unofficial:, (*3)
$browser = new \Buzz\Browser();
$translator = new \DHensen\Translator\Google\GoogleTranslatorUnofficial($browser);
echo $translator->translate('nl', 'en', 'Wat ben jij aan het doen?'); // prints: What are you doing?
dev-master
9999999-dev
Provides translation clients for a few known translation providers
Sources
Download
MIT
The Requires
by
dhensen