=GOOGLETRANSLATE(A2,”en”,”es”) turns the English text in cell A2 into Spanish: type it in an empty cell in Google Sheets, press Enter, then drag the formula down to translate the rest of the column. The function is built into Sheets on the web, needs no add-on, and works with language codes such as “en”, “fr” or “ja”, or “auto” to let Google detect the source language.
How the formula is put together
Google’s reference page gives the syntax as GOOGLETRANSLATE(text, [source_language, target_language]). The square brackets mean the two language arguments are optional.
- text: what to translate. Either type it in quotation marks, as in “Good morning”, or point to a cell such as A2 without quotation marks.
- source_language: the language the text is in, as a two-letter code in quotation marks, for example “en” for English or “ko” for Korean. Use “auto” to have Google detect it. If you leave it out, Sheets uses “auto”.
- target_language: the language you want back, for example “ja” for Japanese. If you leave it out, Sheets uses the system language.
There’s one rule that trips people up: if you leave out source_language, you have to leave out target_language too. So =GOOGLETRANSLATE(A2) is fine (auto-detect, translate into the system language), but you can’t skip only the middle argument. To auto-detect while choosing the output, write “auto” explicitly: =GOOGLETRANSLATE(A2,”auto”,”fr”).
A language code is the short label Google uses for each language. Google’s page defines both language arguments as language codes, so type “es”, not the full name “Spanish”.
Translate a column of text
Say Jordan runs a small online shop and has English product names in A2:A30 that need Spanish versions for a new storefront.
- Label a new column. Type Spanish in B1 so you can tell the original and the translation apart later.
- Enter the formula. Click B2 and type =GOOGLETRANSLATE(A2,”en”,”es”). Check that both codes have straight quotation marks around them.
- Press Enter. The Spanish text appears in B2.
- Fill it down. Click B2 again. A small blue box appears in its lower right corner. Drag that box down to B30. Click B3 and look at the formula bar: it should read =GOOGLETRANSLATE(A3,”en”,”es”), which means each copy is reading its own row. For other ways to copy one formula down a long column, including a keyboard shortcut, see this guide to subtracting and filling formulas down in Google Sheets.
- Read through the results. Scan for product names, brand names and measurements that came back strangely.
Google’s help page shows the function working on a single piece of text or a single cell. It doesn’t say that GOOGLETRANSLATE accepts a whole range at once, so one formula per row, filled down, is the dependable approach.
Keep the language codes in cells
You don’t have to type codes inside the formula. Google’s sample usage includes =GOOGLETRANSLATE(A2,B2,C2), where B2 holds the source code and C2 holds the target code. That layout suits a list where each row goes to a different language:
| A: Text | B: From | C: To | D: Formula |
|---|---|---|---|
| Thank you for your order | en | fr | =GOOGLETRANSLATE(A2,B2,C2) |
| Thank you for your order | en | de | =GOOGLETRANSLATE(A3,B3,C3) |
| Gracias por su pedido | auto | en | =GOOGLETRANSLATE(A4,B4,C4) |
Google’s page doesn’t say whether a code stored in a cell needs quotation marks. Enter the bare code (fr, not “fr”), as in the table, and check the first row’s result before you fill the formula down.
Common language codes
Google’s Cloud Translation language list shows these codes for widely used languages:
| Language | Code | Language | Code |
|---|---|---|---|
| Arabic | ar | Hindi | hi |
| English | en | Japanese | ja |
| French | fr | Korean | ko |
| German | de | Portuguese | pt |
| Hebrew | iw or he | Spanish | es |
A few languages use longer codes in that list, such as zh-CN for Simplified Chinese and zh-TW for Traditional Chinese. Google’s Sheets page only describes two-letter codes, so test a longer code on one cell before filling it down a whole column. The full list is on Google’s Cloud Translation supported languages page.
Find out which language a cell is in
When a column mixes languages, or you just don’t recognize one, DETECTLANGUAGE returns the code. Type =DETECTLANGUAGE(A2) and the cell shows something like “es” or “de”.
Two details from Google’s DETECTLANGUAGE page are worth knowing. If you give it a range, it must be a single column, such as A2:A30. And if that range holds several languages, it reports only the language of the first text it finds, so use one formula per row when you need a code for each entry.
A helper column of detected codes is useful for more than curiosity. Priya, who collects customer feedback from several countries, puts =DETECTLANGUAGE(A2) in column B and =GOOGLETRANSLATE(A2,B2,”en”) in column C. She can then sort or filter by column B to see how many responses came in each language, while column C gives her an English version of every comment.
Turn translations into plain text
A translated cell is still a formula that depends on the original cell. That causes problems if you delete the source column, share only the translations, or need the wording to stay fixed after someone has proofread it. Converting the results to plain text solves all three.
Before you start: Paste values only leaves the translated text in each cell instead of a GOOGLETRANSLATE formula, so later edits to the original column won’t carry over. Do this only after you’re happy with the translations, and keep the original column until you’ve checked the result.
- Select the translated cells, for example B2:B30.
- Copy them with Ctrl + C (⌘ + C on a Mac).
- With the same cells still selected, press Ctrl + Shift + V (⌘ + Shift + V on a Mac) to paste values only. The formulas are replaced by the text they were showing.
- Click one of the cells and look at the formula bar. It should show the translated words, not =GOOGLETRANSLATE.
If something went wrong, press Ctrl + Z (⌘ + Z) straight away to get the formulas back. Plain text is also what ends up in an export: this explanation of what a CSV file keeps from Google Sheets covers the details if you’re sending the list to another system.
When the formula doesn’t work
- An error instead of text. Google’s help page doesn’t list error causes, so start with the parts it does define: each language argument should be a code such as “es” (not “French” or “sp”), and a code typed inside the formula goes in quotation marks, as in Google’s sample usage.
- Blank source rows don’t come back blank. Google doesn’t say what GOOGLETRANSLATE returns for an empty cell, so wrap the formula in IF to keep empty rows empty: =IF(A2=””,””,GOOGLETRANSLATE(A2,”en”,”es”)).
- You skipped the source language but kept a target. Google’s rule is that if source_language is left out, target_language must be left out too, so use “auto” as the source instead.
- The result is in the wrong language. If you left out the target language, Sheets used the system language. Add the target code explicitly.
- Auto-detect guessed wrong. Google doesn’t explain how detection works, so if a row comes back from the wrong source language, replace “auto” with the correct code.
- A long column is slow to fill in. Google’s help page doesn’t mention speed or usage limits for this function. If it happens, work in smaller batches and convert finished rows to plain text as described above.
- The translation reads oddly. GOOGLETRANSLATE returns a machine translation, and Google’s help page makes no promise about its accuracy. Have a fluent speaker review anything customers will see, such as product listings or emails.
GOOGLETRANSLATE questions people run into
Is there a way to translate a whole sheet without formulas?
Google’s Sheets help doesn’t describe a built-in way to translate a whole sheet at once; GOOGLETRANSLATE works on the text or cell you give it. Add-ons from other developers are installed from Extensions > Add-ons > Get add-ons, and Google notes that most show a message asking for access to the data they need, so read it before you click Allow.
Can I see the syntax while I’m typing the formula?
Yes. As you type =GOOGLETRANSLATE( a function help box shows the function’s syntax and an example. Press Shift + F1 (Shift + Fn + F1 on a Mac) to show or hide it. If suggestions get in the way, turn them off with Tools > Suggestion controls > Enable formula suggestions.
For your first try, put three short sentences in column A and translate them with =GOOGLETRANSLATE(A2,”auto”,”en”) to see how detection and translation behave on your own text. The GOOGLETRANSLATE reference on Google’s help site lists the syntax if you need to check it later.
Matthew Burleigh has been a freelance writer since the early 2000s. You can find his writing all over the Web, where his content has collectively been read millions of times.
Matthew received his Master’s degree in Computer Science, then spent over a decade as an IT consultant for small businesses before focusing on writing and website creation.
The topics he covers for MasterYourTech.com include iPhones, Microsoft Office, and Google Apps.
You can read his full bio here.