PHP code example of kaadon / translate
1. Go to this page and download the library: Download kaadon/translate 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/ */
kaadon / translate example snippets
>$TranslateV2 = new TranslateV2("");
>var_dump($TranslateV2->translateText("你好",'en'));
>var_dump($TranslateV2->translateJson('{"a":"你好","b":{"b1":"你在哪","b2":"你回家了吗"}}','en'));
>
>
>