Google Sheets function · Google-only
GOOGLETRANSLATE in Google Sheets: syntax and examples
GOOGLETRANSLATE sends text to Google Translate and returns the result in the cell. Pass a source and a target language code, or let Sheets detect the source with "auto".
Syntax
GOOGLETRANSLATE(text, [source_language], [target_language])
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
text | string | yes | The text to translate, or a cell or range holding it. |
source_language | string | no | Two-letter code of the original language, or "auto" to detect it. Default is auto. |
target_language | string | no | Two-letter code of the language to translate into. Default is the language of the file locale. |
Examples
The examples use this table, starting in A1:
| Text |
| Good morning |
| Thank you |
=GOOGLETRANSLATE("Good morning", "en", "es")Result: Buen día
English to Spanish with explicit codes.
Run in a Google Sheet (English US locale) on . The result changes over time; this is the value on the run date.
=GOOGLETRANSLATE(A3, "en", "de")Result: Danke
Translate the text of a cell into German.
Run in a Google Sheet (English US locale) on . The result changes over time; this is the value on the run date.
=GOOGLETRANSLATE("Bonjour", "auto", "en")Result: Good morning
Let Sheets detect the source language.
Run in a Google Sheet (English US locale) on . The result changes over time; this is the value on the run date.
=GOOGLETRANSLATE(A2, "en", "fr")Result: Bonjour
Translate the text of a cell into French.
Run in a Google Sheet (English US locale) on . The result changes over time; this is the value on the run date.
=GOOGLETRANSLATE("Hello", "en", "en")Result: Hello
Same source and target language: the text comes back unchanged.
Run in a Google Sheet (English US locale) on . The result changes over time; this is the value on the run date.
Common errors
- Language codes look like en, ro, de, fr. An unknown code returns #VALUE!.
- Always write the target language. In the Romania locale a formula without it returned #VALUE!, while in en_US it returned the text unchanged.
- Use the output as display text. The wording comes from the translation service, so do not use it as a lookup key.
- A range as the first argument returns #VALUE!. Translate cell by cell.