To use Kohana Translation API, download and extract the latest stable release of Kohana Translation API from Github. Place the module into your Kohana instances modules folder. Finally enable the module within the application bootstrap within the section entitled modules.
Kohana Translation API provides translation services
- MyMemory
To test if your Kohana Translation API works properly try this small test in your controller:
Translator::selfTest();
The following is a quick example of how to use Kohana Translation API.
$sampleText = "Bonjour de cette partie du monde";
/* translate(string, to_language, from_language) */
echo Translator::translate($sampleText , "pl", "fr");