Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 369 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 10 classes

Google_Service_Translate:: (1 method):
  __construct()

Google_Service_Translate_Detections_Resource:: (1 method):
  listDetections()

Google_Service_Translate_Languages_Resource:: (1 method):
  listLanguages()

Google_Service_Translate_Translations_Resource:: (1 method):
  listTranslations()

Google_Service_Translate_DetectionsListResponse:: (2 methods):
  setDetections()
  getDetections()

Google_Service_Translate_DetectionsResourceItems:: (6 methods):
  setConfidence()
  getConfidence()
  setIsReliable()
  getIsReliable()
  setLanguage()
  getLanguage()

Google_Service_Translate_LanguagesListResponse:: (2 methods):
  setLanguages()
  getLanguages()

Google_Service_Translate_LanguagesResource:: (4 methods):
  setLanguage()
  getLanguage()
  setName()
  getName()

Google_Service_Translate_TranslationsListResponse:: (2 methods):
  setTranslations()
  getTranslations()

Google_Service_Translate_TranslationsResource:: (4 methods):
  setDetectedSourceLanguage()
  getDetectedSourceLanguage()
  setTranslatedText()
  getTranslatedText()


Class: Google_Service_Translate  - X-Ref

Service definition for Translate (v2).

<p>
Lets you translate text from one language to another</p>

<p>
For more information about this service, see the API
<a href="https://developers.google.com/translate/v2/using_rest" target="_blank">Documentation</a>
</p>

__construct(Google_Client $client)   X-Ref
Constructs the internal representation of the Translate service.

param: Google_Client $client

Class: Google_Service_Translate_Detections_Resource  - X-Ref

The "detections" collection of methods.
Typical usage is:
<code>
$translateService = new Google_Service_Translate(...);
$detections = $translateService->detections;
</code>

listDetections($q, $optParams = array()   X-Ref
Detect the language of text. (detections.listDetections)

param: string $q The text to detect
param: array $optParams Optional parameters.
return: Google_Service_Translate_DetectionsListResponse

Class: Google_Service_Translate_Languages_Resource  - X-Ref

The "languages" collection of methods.
Typical usage is:
<code>
$translateService = new Google_Service_Translate(...);
$languages = $translateService->languages;
</code>

listLanguages($optParams = array()   X-Ref
List the source/target languages supported by the API
(languages.listLanguages)

param: array $optParams Optional parameters.
return: Google_Service_Translate_LanguagesListResponse

Class: Google_Service_Translate_Translations_Resource  - X-Ref

The "translations" collection of methods.
Typical usage is:
<code>
$translateService = new Google_Service_Translate(...);
$translations = $translateService->translations;
</code>

listTranslations($q, $target, $optParams = array()   X-Ref
Returns text translations from one language to another.
(translations.listTranslations)

param: string $q The text to translate
param: string $target The target language into which the text should be
param: array $optParams Optional parameters.
return: Google_Service_Translate_TranslationsListResponse

Class: Google_Service_Translate_DetectionsResourceItems  - X-Ref

setConfidence($confidence)   X-Ref
No description

getConfidence()   X-Ref
No description

setIsReliable($isReliable)   X-Ref
No description

getIsReliable()   X-Ref
No description

setLanguage($language)   X-Ref
No description

getLanguage()   X-Ref
No description

Class: Google_Service_Translate_LanguagesResource  - X-Ref

setLanguage($language)   X-Ref
No description

getLanguage()   X-Ref
No description

setName($name)   X-Ref
No description

getName()   X-Ref
No description