Skip to content

PHP class to use the Google Translator API for free.

License

Notifications You must be signed in to change notification settings

codeigniterpower/codeigniter-googletranslate

 
 

Repository files navigation

PHP GoogleTranslate free

Simple PHP library for talking to Google's Translate internal browser API for free. (https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=es&dt=t&q=table+is+table)

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;

About

PHP class to use the Google Translator API for free.

Resources

License

Stars

Watchers

Forks

Languages

  • PHP 100.0%