https://github.com/statickidz/php-google-translate-free
PHP class to use the Google Translator API for free.
https://github.com/statickidz/php-google-translate-free
api google php translate translation translator
Last synced: about 1 year ago
JSON representation
PHP class to use the Google Translator API for free.
- Host: GitHub
- URL: https://github.com/statickidz/php-google-translate-free
- Owner: statickidz
- License: gpl-3.0
- Created: 2015-04-07T13:34:24.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-08-22T10:33:10.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T01:01:28.689Z (over 1 year ago)
- Topics: api, google, php, translate, translation, translator
- Language: PHP
- Homepage:
- Size: 107 KB
- Stars: 272
- Watchers: 27
- Forks: 89
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PHP GoogleTranslate free 
Simple PHP library for talking to Google's Translate API for free.
Eliminates IP request limitations
## Installation
Install this package via [Composer](https://getcomposer.org/).
```
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`.
```json
"require": {
"statickidz/php-google-translate-free": "^1.2.1"
}
```
## Usage
```php
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;
```