# Cloud Translation V3 API - Class Google::Cloud::Translate::V3::Translation (v1.10.0)

1.10.0 (latest) 1.9.0 1.8.0 1.7.1 1.6.0 1.5.2 1.4.1 1.3.0 1.2.0 1.1.1 1.0.0 0.12.0 0.11.2 0.10.0 0.9.0 0.8.0 0.7.3 0.6.0 0.5.2 0.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 ISO-639 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 ISO-639 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 ISO-639 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**

- ([::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-translate-v3/latest/Google-Cloud-Translate-V3-TranslateTextGlossaryConfig)) --- The `glossary_config` used for this translation.

### #glossary_config=

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

**Parameter**

- **value** ([::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-translate-v3/latest/Google-Cloud-Translate-V3-TranslateTextGlossaryConfig)) --- The `glossary_config` used for this translation.
**Returns**

- ([::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-translate-v3/latest/Google-Cloud-Translate-V3-TranslateTextGlossaryConfig)) --- The `glossary_config` used for this translation.

### #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.