# DetectLanguageResponse

- [JSON representation](https://docs.cloud.google.com/translate/docs/reference/rest/v3/DetectLanguageResponse#SCHEMA_REPRESENTATION)
- [DetectedLanguage](https://docs.cloud.google.com/translate/docs/reference/rest/v3/DetectLanguageResponse#DetectedLanguage)
  - [JSON representation](https://docs.cloud.google.com/translate/docs/reference/rest/v3/DetectLanguageResponse#DetectedLanguage.SCHEMA_REPRESENTATION)

The response message for language detection.

| JSON representation |
|---|
| ``` { "languages": [ { object (`https://docs.cloud.google.com/translate/docs/reference/rest/v3/DetectLanguageResponse#DetectedLanguage`) } ] } ``` |

| Fields ||
|---|---|
| `languages[]` | ``object (`https://docs.cloud.google.com/translate/docs/reference/rest/v3/DetectLanguageResponse#DetectedLanguage`)`` The most probable language detected by the Translation API. For each request, the Translation API will always return only one result. |

## DetectedLanguage

The response message for language detection.

| JSON representation |
|---|
| ``` { "languageCode": string, "confidence": number } ``` |

| Fields ||
|---|---|
| `languageCode` | `string` The ISO-639 language code of the source content in the request, detected automatically. |
| `confidence` | `number` The confidence of the detection result for this language. |