Cloud Translation V3 API - Class Google::Cloud::Translate::V3::Translation (v0.4.2)

Reference documentation and code samples for the Cloud Translation V3 API class Google::Cloud::Translate::V3::Translation.

A single translation response.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#detected_language_code

def detected_language_code() -> ::String
Returns
  • (::String) — The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.

#detected_language_code=

def detected_language_code=(value) -> ::String
Parameter
  • value (::String) — The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.
Returns
  • (::String) — The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.

#glossary_config

def glossary_config() -> ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig
Returns

#glossary_config=

def glossary_config=(value) -> ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig
Parameter
Returns

#model

def model() -> ::String
Returns
  • (::String) — Only present when model is present in the request. model here is normalized to have project number.

    For example: If the model requested in TranslationTextRequest is projects/{project-id}/locations/{location-id}/models/general/nmt then model here would be normalized to projects/{project-number}/locations/{location-id}/models/general/nmt.

#model=

def model=(value) -> ::String
Parameter
  • value (::String) — Only present when model is present in the request. model here is normalized to have project number.

    For example: If the model requested in TranslationTextRequest is projects/{project-id}/locations/{location-id}/models/general/nmt then model here would be normalized to projects/{project-number}/locations/{location-id}/models/general/nmt.

Returns
  • (::String) — Only present when model is present in the request. model here is normalized to have project number.

    For example: If the model requested in TranslationTextRequest is projects/{project-id}/locations/{location-id}/models/general/nmt then model here would be normalized to projects/{project-number}/locations/{location-id}/models/general/nmt.

#translated_text

def translated_text() -> ::String
Returns
  • (::String) — Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.

#translated_text=

def translated_text=(value) -> ::String
Parameter
  • value (::String) — Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.
Returns
  • (::String) — Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.