PhpDev.App
statickidz/php-google-translate-free

statickidz/php-google-translate-free

Stars: 259

Forks: 95

Pull Requests: 8

Issues: 32

Watchers: 25

Last Updated: 2021-04-12 15:02:56

PHP class to use the Google Translator API for free.

License: GNU General Public License v3.0

Languages: PHP

PHP GoogleTranslate free Build Status

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;