Simple wrapper for Google Translate (REST) API. Includes a Laravel 5 Service Provider and Facade.
Via Composer
$ composer require jcorry/gootranslate
Or
require : { "jcorry/gootranslate": "dev-master" }
Add your Google API key to .env
GOOGLE_API_KEY=YOUR-KEY-VALUE-HERE
Add provider to your app/config/app.php providers:
Jcorry\GooTranslate\GooTranslateServiceProvider::class
Add alias to app/config/app.php to use facade
'GooTranslate' => Jcorry\GooTranslate\GooTranslateFacade::class
List available languages...
GooTranslate::languages();
Translate
GooTranslate::translate('Here is a string to translate', 'zu');
Results in...
```
[
{#644
+"translatedText": "Nasi string ukuhumusha",
+"detectedSourceLanguage": "en",
},
]
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email jcorry@gmail.com instead of using the issue tracker.
The DBAD License (DBAD). Please see License File for more information.