# Google Translate

> Translate text between languages and detect the language of text using Google Translate.

App · Translation · 2 actions. Web page: https://docs.lodol.com/docs/integrations/google-translate

## Actions

### Detect language

Detect which language a piece of text is written in using Google Translate.

**Inputs**

- Text (`text`, text, required): The text whose language you want to detect.

**Outputs**

- `confidence` (number): Google's confidence in the detection, from 0 to 1
- `is_reliable` (true/false): Whether Google considers the detection reliable
- `language` (text): The detected language as a Google Translate language code (e.g. 'es')
- `language_name` (text): The friendly name of the detected language (e.g. 'Spanish')

**Example output**

```json
{
  "confidence": 0.98,
  "is_reliable": true,
  "language": "es",
  "language_name": "Spanish"
}
```

### Translate text

Translate text from one language to another using Google Translate.

**Inputs**

- Text (`text`, text, required): The text to translate.
- Translate into (`target_language`, text, required): The language to translate the text into. One of: `en` (English (en)), `es` (Spanish (es)), `fr` (French (fr)), `de` (German (de)), `it` (Italian (it)), `pt` (Portuguese (pt)), `nl` (Dutch (nl)), `ru` (Russian (ru)), `zh-CN` (Chinese, Simplified (zh-CN)), `zh-TW` (Chinese, Traditional (zh-TW)), and 20 more.
- Original language (`source_language`, text): The language the original text is written in. Leave on 'Detect automatically' to let Google figure it out. One of: `""` (Detect automatically), `en` (English (en)), `es` (Spanish (es)), `fr` (French (fr)), `de` (German (de)), `it` (Italian (it)), `pt` (Portuguese (pt)), `nl` (Dutch (nl)), `ru` (Russian (ru)), `zh-CN` (Chinese, Simplified (zh-CN)), and 21 more.

**Outputs**

- `detected_source_language` (text): The detected source language code (when the original language was auto-detected)
- `model` (text): The model used for translation
- `translated_text` (text): The translated text

**Example output**

```json
{
  "detected_source_language": "en",
  "model": "nmt",
  "translated_text": "Hola, \u00bfc\u00f3mo est\u00e1s?"
}
```
