1. Go to this page and download the library: Download niyko/transpicious 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/ */
Transpicious::translate('Friends don’t lie'); // Returns Friends don’t lie
Transpicious::translate('Friends don’t lie', 'es'); // Returns Los amigos no mienten
Transpicious::translate('Los amigos no mienten', 'ch', 'es'); // Returns 朋友不撒谎
Transpicious::translate('Los amigos no mienten', null, 'es'); // Returns Friends don’t lie
Transpicious::set_translate_to('TRANSLATE TO');
Transpicious::set_translate_to('es');
echo Transpicious::translate('She‘s our friend and she‘s crazy.');
// The output will be : Ella es nuestra amiga y está loca
Transpicious::set_translate_to('es');
echo Transpicious::translate('Mornings are for coffee and contemplation');
echo Transpicious::translate('Mornings are for coffee and contemplation', 'ar'); // <= Note that translate() has a 2nd parameter
/* The output will be :-
Las mañanas son para el café y la contemplación.
الصباح لتناول القهوة والتأمل
*/