1. Go to this page and download the library: Download fei/translate-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fei / translate-client example snippets
$translate = new Translate([Translate::OPTION_BASEURL => 'http://translate.dev']);
$translate->setTransport(new BasicTransport());
use Fei\Service\Translate\Client\ Translate;
use Fei\ApiClient\Transport\BasicTransport;
use Fei\ApiClient\Transport\BeanstalkProxyTransport;
use Pheanstalk\Pheanstalk;
$translate = new Translate([Translate::OPTION_BASEURL => 'https://translate.api']); // Put your translate API base URL here
$translate->setTransport(new BasicTransport());
$proxy = new BeanstalkProxyTransport();
$proxy->setPheanstalk(new Pheanstalk('127.0.0.1'));
$translate->setAsyncTransport($proxy);
// Use the translate client methods...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.