statickidz / php-google-translate-free
Google Translate Free library for PHP
Fund package maintenance!
statickidz
Installs: 181 348
Dependents: 4
Suggesters: 1
Security: 0
Stars: 271
Watchers: 27
Forks: 89
Open Issues: 5
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: >=11.3.1
README
Simple PHP library for talking to Google's Translate API for free.
Eliminates IP request limitations
Installation
Install this package via Composer.
composer require statickidz/php-google-translate-free
Or edit your project's composer.json
to require statickidz/php-google-translate-free
and then run composer update
.
"require": { "statickidz/php-google-translate-free": "^1.2.1" }
Usage
require_once ('vendor/autoload.php'); use \Statickidz\GoogleTranslate; $source = 'es'; $target = 'en'; $text = 'buenos días'; $trans = new GoogleTranslate(); $result = $trans->translate($source, $target, $text); // Good morning echo $result;