Google_TranslationsServiceResource

The "translations" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api/src/contrib/Google_TranslateService.php  
  1. class Google_TranslationsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Returns text translations from one language to another. (translations.list) 
  6. * @param string $q The text to translate 
  7. * @param string $target The target language into which the text should be translated 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string source The source language of the text 
  10. * @opt_param string format The format of the text 
  11. * @opt_param string cid The customization id for translate 
  12. * @return Google_TranslationsListResponse 
  13. */ 
  14. public function listTranslations($q, $target, $optParams = array()) { 
  15. $params = array('q' => $q, 'target' => $target); 
  16. $params = array_merge($params, $optParams); 
  17. $data = $this->__call('list', array($params)); 
  18. if ($this->useObjects()) { 
  19. return new Google_TranslationsListResponse($data); 
  20. } else { 
  21. return $data;