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
- class Google_TranslationsServiceResource extends Google_ServiceResource {
- /**
- * Returns text translations from one language to another. (translations.list)
- *
- * @param string $q The text to translate
- * @param string $target The target language into which the text should be translated
- * @param array $optParams Optional parameters.
- *
- * @opt_param string source The source language of the text
- * @opt_param string format The format of the text
- * @opt_param string cid The customization id for translate
- * @return Google_TranslationsListResponse
- */
- public function listTranslations($q, $target, $optParams = array()) {
- $params = array('q' => $q, 'target' => $target);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_TranslationsListResponse($data);
- } else {
- return $data;
- }
- }
- }