# Google Translate (/integrations/google_translate)



{/* MANUAL-CONTENT-START:intro */}

[Google Cloud Translation](https://cloud.google.com/translate) translates text and detects its source language. Provide text and a target language for translation, or use language detection when the source language is unknown.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Translate and detect languages using the Google Cloud Translation API. Supports auto-detection of the source language.

## Actions [#actions]

### Google Translate [#google-translate]

Translate text between languages using the Google Cloud Translation API. Supports auto-detection of the source language.

#### Input [#input]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `apiKey` | string | Yes | Google Cloud API key with Cloud Translation API enabled |
| `text` | string | Yes | The text to translate |
| `target` | string | Yes | Target language code (e.g., "es", "fr", "de", "ja") |
| `source` | string | No | Source language code. If omitted, the API will auto-detect the source language. |
| `format` | string | No | Format of the text: "text" for plain text, "html" for HTML content |

#### Output [#output]

| Parameter | Type | Description |
| - | - | - |
| `translatedText` | string | The translated text |
| `detectedSourceLanguage` | string | The detected source language code (if source was not specified) |

### Google Translate Detect Language [#google-translate-detect-language]

Detect the language of text using the Google Cloud Translation API.

#### Input [#input-1]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `apiKey` | string | Yes | Google Cloud API key with Cloud Translation API enabled |
| `text` | string | Yes | The text to detect the language of |

#### Output [#output-1]

| Parameter | Type | Description |
| - | - | - |
| `language` | string | The detected language code (e.g., "en", "es", "fr") |
| `confidence` | number | Confidence score of the detection |
