GoogleTranslateClient.php
\file \brief Defines GoogleTranslateClient class for word translation
Usage: use Lwt\Modules\Dictionary\Infrastructure\Translation\GoogleTranslateClient;
$translations = GoogleTranslateClient::staticTranslate('Hello','en','de');
if(!$translations)
echo 'Error: No translation found!';
else
foreach($translations as $transl){
echo $transl, '
';
}
PHP version 8.1
Tags
Table of Contents
Classes
- GoogleTranslateClient
- Wrapper class to get translation.