Google Cloud Translation API . languages

Instance Methods

close()

Close httplib2 connections.

list(model=None, target=None, x__xgafv=None)

Returns a list of supported languages for translation.

Method Details

close()
Close httplib2 connections.
list(model=None, target=None, x__xgafv=None)
Returns a list of supported languages for translation.

Args:
  model: string, The model type for which supported languages should be returned.
  target: string, The language to use to return localized, human readable names of supported
languages.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
  "languages": [ # List of source/target languages supported by the translation API. If target parameter is unspecified, the list is sorted by the ASCII code point order of the language code. If target parameter is specified, the list is sorted by the collation order of the language name in the target language.
    {
      "language": "A String", # Supported language code, generally consisting of its ISO 639-1
          # identifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including
          # language + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH')
      "name": "A String", # Human readable name of the language localized to the target language.
    },
  ],
}