I using https://github.com/google/google-api-php-client for translate.
When I try
print_r($translation->listTranslations( "John go home", "es" ));
I got
Google_Service_Translate_TranslationsListResponse Object
(
[collection_key:protected] => translations
[internal_gapi_mappings:protected] => Array
(
)
[translationsType:protected] => Google_Service_Translate_TranslationsResource
[translationsDataType:protected] => array
[modelData:protected] => Array
(
[data] => Array
(
[translations] => Array
(
[0] => Array
(
[translatedText] => John ir a casa
[detectedSourceLanguage] => en
)
)
)
)
[processed:protected] => Array
(
)
)
But when I try to get translations using getTranslations() function - i got empty array. Please advice!