In Google Sheets, the GOOGLETRANSLATE function uses language codes such as en for English and es for Spanish; use auto to detect the source language automatically. For example, =GOOGLETRANSLATE(A2,"en","fr") translates the text in A2 from English to French.
What language codes does Google Sheets use?
Google Sheets uses short language identifiers in the source-language and target-language arguments of GOOGLETRANSLATE. Many common choices are two-letter codes, often corresponding to ISO 639-1 language codes. Examples include en for English, es for Spanish, fr for French, and de for German.
The function accepts codes used by Google Translate, and some languages have regional or script-specific variants. The codes are identifiers, not necessarily the same thing as a country code or a spreadsheet locale. For example, en identifies English; it does not specify whether the text should follow British or American conventions. Google’s supported language choices and variants can change, so treat the examples below as practical starting points rather than a complete, permanent catalog.
For automatic detection, use the literal code auto in the source-language position. It is not a target language: the function needs a specific destination language so it knows what to produce.
How the GOOGLETRANSLATE formula works
The function syntax is GOOGLETRANSLATE(text, [source_language, target_language]). The text argument can be quoted text or a reference to a cell. The square brackets in the syntax indicate optional arguments; they are not typed into the formula. If you leave out the language arguments, Sheets uses automatic source detection and a default target language based on your spreadsheet’s settings.
- Text: the words or cell value you want translated.
- Source language: a code for the language the text is written in, or
auto. - Target language: a code for the language you want returned.
With a sentence typed directly in a formula, the pattern is =GOOGLETRANSLATE("Good morning","en","it"). To translate a cell, use =GOOGLETRANSLATE(A2,"en","it"). The second version is easier to fill down a column: put the original text in A2, enter the formula in B2, then copy it to the rows below. Each result is a translation of the corresponding cell.
In Google Sheets in a web browser, enter the formula in a cell and press Enter. If your spreadsheet locale expects semicolons as formula separators, replace the commas with semicolons. That separator difference is a locale setting, not a different translation-code system. Excel does not provide Google Sheets’ GOOGLETRANSLATE function, so a Sheets formula using it will not work as-is in Excel.
Common language codes and examples
These widely used codes are useful for many everyday translations. They are examples, not a promise that every regional variety or feature is available for every code.
en— Englishes— Spanishfr— Frenchde— Germanit— Italianpt— Portugueseru— Russianja— Japaneseko— Koreanzh— Chinesear— Arabichi— Hindi
For instance, to translate a Spanish phrase in A2 into English, use =GOOGLETRANSLATE(A2,"es","en"). If A2 contains ¿Dónde está la estación?, the result is an English translation such as “Where is the station?” Wording can differ while preserving the general meaning; translation is not a word-for-word guarantee.
Choosing the source and target languages
When you know the input language, specify it rather than relying on detection. A known source code removes ambiguity, especially for very short text, names, abbreviations, or a single word that occurs in several languages. If a column contains a mixture of languages, auto can be convenient, but automatic detection can still guess incorrectly when there is too little context.
Always choose a target code that represents the language you want readers to receive. A target such as fr asks for French but does not necessarily select a particular regional style. If your audience needs a specific national or script variant, check whether Google Translate supports an appropriate variant and test it with representative text.
Use the same source and destination code only when you intentionally want the text returned in that language; it will not proofread or improve the writing. Also check what a code means before using an unfamiliar one. A country code such as CA is not, by itself, the language code for Canadian French or Canadian English.
Regional variants, scripts, and code formatting
Some language choices need more detail than a basic language identifier. Chinese is a useful example: Google Translate commonly distinguishes Simplified and Traditional Chinese with variants such as zh-CN and zh-TW. Portuguese may also be offered with regional variants, including pt-BR for Brazilian Portuguese. These forms combine a language identifier with a region or variant.
Do not assume that every possible combination of language and country is accepted. A syntactically plausible code is not proof that the translation service supports it. If a regional code is rejected, consult Google Translate’s current language selector or help information, then try the supported language option that best matches your use case. A basic code such as pt may be preferable if no specific regional distinction is required.
Enter codes as text in quotation marks in a formula, using the spelling and capitalization shown for the supported choice. Codes are not translated words, and adding a country name or inventing a suffix will not make an unsupported variant work.
Using codes for a column of translations
A simple worksheet can keep the original text, source code, target code, and translated result in separate columns. For example, place source text in A2, source code in B2, and target code in C2. In D2, use =GOOGLETRANSLATE(A2,B2,C2), then fill the formula down. This setup is useful when different rows need different language pairs.
If every row uses the same pair, a fixed-code formula is more straightforward. With source text in A2, enter =GOOGLETRANSLATE(A2,"en","es") in B2 and copy down. For a one-off translation, direct text in the formula is fine; for a list that may be edited, cell references are easier to maintain because changing the source cell recalculates its translation.
Keep the original text in its own column. That makes it easier to compare the translation against the source, correct a mistaken source-language choice, or switch the destination language without losing the input. It also helps reviewers identify rows where automatic detection or an unusual phrase may have produced an unexpected result.
Common errors and how to fix them
A formula error or an unexpected translation can have several causes. Check the arguments first: there must be text, an appropriate source value, and a supported target value. For example, =GOOGLETRANSLATE(A2,"auto","de") uses automatic detection for its input and German as its destination.
- The formula is rejected: confirm that the function is spelled
GOOGLETRANSLATE, that quotation marks and parentheses are balanced, and that your locale uses the separators you entered. - A language code is not accepted: check the code against Google Translate’s current supported choices. Do not substitute a country code just because it resembles the language’s name.
- The result is in the wrong language: verify the target argument’s position. The second language argument is the destination; the first is the source.
- Detection seems wrong: replace
autowith the known source code, particularly for short phrases, names, or mixed-language text. - The result is delayed or an error appears temporarily: check your connection and try again later. The function relies on Google’s translation service, so availability and processing can be affected by service conditions.
Also inspect the input for empty cells, unusual punctuation, or text that includes several languages. A technically valid formula cannot resolve unclear source text or determine which meaning of an ambiguous word you intended.
Accuracy, privacy, and practical limitations
GOOGLETRANSLATE is useful for drafts, summaries, and understanding general content, but its output may miss idioms, tone, context, or specialist terminology. A short product label, legal phrase, medical instruction, or public-facing message deserves review by a fluent speaker or qualified translator. Do not treat an automated result as a certified translation.
The formula sends text to Google’s translation service in order to return a translation. Consider that before placing confidential, personal, or otherwise sensitive material in a cell that is passed to this function. Follow your organization’s data-handling rules and the applicable Google service terms; do not assume that a spreadsheet formula makes sensitive content private or suitable for external processing.
Large sheets can also take time to calculate, and translation output depends on an online service rather than a fixed dictionary stored in the workbook. Avoid building critical workflows around an assumption that every request will always complete instantly or that results will never change. For important content, retain the source and review the translated output.
Alternatives when a formula is not enough
For an occasional phrase, Google Translate’s website can be easier: choose the languages from its interface and paste the text. This is also a practical way to check which language options are currently offered. For a glossary or important repeated content, maintain approved translations in a separate table and use a lookup formula to retrieve the reviewed wording instead of generating a fresh machine translation for every row.
For a multilingual publication or workflow with business requirements, a human translator or a translation-management service may offer review, terminology control, and a clearer approval process. Those options take more setup or cost, but can be more appropriate when accuracy, consistency, or confidentiality matters more than quick first-pass translation.
Frequently Asked Questions
What is the language code for English in Google Sheets?
Use en for English. For example, =GOOGLETRANSLATE(A2,"en","fr") translates the text in A2 from English to French.
Can Google Sheets detect the source language automatically?
Yes. Put auto in the source-language argument, as in =GOOGLETRANSLATE(A2,"auto","es"). Automatic detection is less dependable for very short or ambiguous text than specifying the source language.
What does zh-CN mean in GOOGLETRANSLATE?zh-CN is a commonly used Google Translate variant for Simplified Chinese. A related option, zh-TW, is commonly used for Traditional Chinese. Check the current language options if you need a specific variety.
Can I use GOOGLETRANSLATE in Microsoft Excel?
Not as a built-in Excel worksheet function. GOOGLETRANSLATE is for Google Sheets; an Excel workbook will not recognize that function unless a separate tool or custom integration provides it.
Why does GOOGLETRANSLATE return an error?
Check the function name, formula separators, quotation marks, and language codes. Also confirm that the source and target arguments are in the right order and that the spreadsheet can connect to Google’s translation service.
Related
- Insert a Section Into a Table of Contents in Microsoft Word
- Signature Line in Word Without the X Placeholder Symbol
- Insert a Square Checkbox in Word: Symbol or Clickable Box
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Get a Search Bar in Excel to Search Your DataTo search immediately, press Ctrl+F in Excel for Windows, type a word, and press Enter; Excel opens its…
- Out of Office in New Outlook: Set It Up and Schedule ItTo set up an out-of-office reply in New Outlook, open Settings, go to Accounts > Automatic replies, choose…
- How to Make a Booklet in Microsoft Word 365To make a booklet in Word 365, open the desktop app, go to Layout > Margins > Custom…
- Excel Spreadsheet vs Google Sheets: Which Should You Use?Excel is usually the stronger choice for complex analysis, large workbooks, and advanced data tools; Google Sheets is…
- How to Share a Custom Calendar in Microsoft OutlookTo share a custom calendar in Outlook, select the calendar, open its sharing controls, add the recipient’s email…
- How to Add Automatic Page Numbers in Microsoft WordTo add automatic page numbers in Word, open the Insert tab, choose Page Number, select where the numbers…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.