1. Go to this page and download the library: Download sayhe110/easy-translation 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/ */
sayhe110 / easy-translation example snippets
use Sayhe110\Translation\Translation;
$key = 'XXXXXXXXXXXXXXXXXXXXXXXX';
$appid = 'XXXXXXXXXXXXXXXXXXXXXXXX';
$translation = new Translation($key, $appid);
$result = $translation->translation('我要翻译这段话');
print_r($result);