2017 © Pedro Peláez
 

library php-google-translate-for-free

Library for free use Google Translator. With attempts connecting on failure and array support.

image

dejurin/php-google-translate-for-free

Library for free use Google Translator. With attempts connecting on failure and array support.

  • Sunday, March 4, 2018
  • by Dejurin
  • Repository
  • 2 Watchers
  • 5 Stars
  • 45 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 137 % Grown

The README.md

GoogleTranslateForFree

Packagist: https://packagist.org/packages/dejurin/php-google-translate-for-free, (*1)

version downloads StyleCI, (*2)

Library for free use Google Translator. With attempts connecting on failure and array support., (*3)


"Buy Me A Coffee", (*4)


Installation

Install this package via Composer., (*5)

composer require dejurin/php-google-translate-for-free

Or edit your project's composer.json to require dejurin/php-google-translate-for-free and then run composer update., (*6)

"require": {
    "dejurin/php-google-translate-for-free": "^1.0"
}

Usage

require_once ('vendor/autoload.php');
use \Dejurin\GoogleTranslateForFree;

Single

$source = 'en';
$target = 'ro';
$attempts = 5;
$text = 'Hello';

$tr = new GoogleTranslateForFree();
$result = $tr->translate($source, $target, $text, $attempts);

var_dump($result); 

/* 
    string(24) "Salut"
*/

Array

$source = 'en';
$target = 'ro';
$attempts = 5;
$arr = ['hello','world'];

$tr = new GoogleTranslateForFree();
$result = $tr->translate($source, $target, $arr, $attempts);

var_dump($result); 

/*
    array(2) {
      [0]=>
      string(24) "salut"
      [1]=>
      string(6) "lume"
    }

*/

License

This source code is distributed under MIT license., (*7)


Sponsors

https://currencyrate.today

https://moneyconvert.net/

https://co-w.io/

https://co-in.io/

https://fx-w.io/

The Versions

04/03 2018

dev-master

9999999-dev https://github.com/dejurin/php-google-translate-for-free

Library for free use Google Translator. With attempts connecting on failure and array support.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.4

 

api google translator translate free

02/03 2018

1.0.0

1.0.0.0 https://github.com/dejurin/php-google-translate-for-free

Library for free use Google Translator. With attempts connecting on failure and array support.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.4

 

api google translator translate free