While there are several similarities between Excel and Google Sheets, the GOOGLETRANSLATE function is a feature that is only available in the latter. Because Google Sheets is web-based and connected to Google's powerful APIs, the GOOGLETRANSLATE function enables you to translate words and phrases in Google Sheets from one language to another. Because this function is powered by the Google Translate technology, it works with any language that Google Translate supports.
=GOOGLETRANSLATE(Text, [From_language, To_language])
Here are some examples of the GOOGLETRANSLATE function in action.
|2||¡Hola!||=GOOGLETRANSLATE(A2, "es", "en")||Hello!|
|3||これは日本人です!||=GOOGLETRANSLATE(A3, "ja", "en")||This is Japanese!|
|4||Vertaal is lekker||=GOOGLETRANSLATE(A4, "auto", "en")||Translating is fun|
|5||Hvernig hefurðu það?||=GOOGLETRANSLATE(A5)||How are you?|
In the first example, we see that the text in cell A2 is written in Spanish, but we want to translate it to English. We use A2 as the first argument, "es" (the language code for Spanish) for the second argument, and "en" (the language code for English) as the third argument.
=GOOGLETRANSLATE(A2, "es", "en")
This formula returns a result of "Hello!" in English.
In the second example we see that the text in cell A3 is written in Japanese and we want to translate it to English.
=GOOGLETRANSLATE(A3, "ja", "en")
This formula returns a result of "This is Japanese!" in English.
In the third example, we see some text in cell A4, but we're not sure what language this is. We can supply "auto" as the second argument, so that Google will detect the language on its own.
=GOOGLETRANSLATE(A4, "auto", "en")
This formula detects the language is Afrikaans (we could use the DETECTLANGUAGE function if we need to know which language this is) and returns a result of "Translating is fun" in English in cell C4.
In the fourth and final example we see more fun text in cell A5, but again, we don't know what language this is. We can just leave from_language and to_language blank.
Google will detect the language of the text in cell C5 (Icelandic) and translates it to the system language of the user's computer, which, in this example, happens to be English. This formula returns a result of "How are you?" in English in cell C5.
When using the GOOGLETRANSLATE function in Google Sheets, the language arguments in the formula need to be in the form of the language codes shown in the table below. If you attempt to provide the actual language (e.g. "spanish") as an argument, your formula will return a #VALUE! error. Rather than writing "spanish" for example, you would provide "es" as the language argument.
As of February 2020, Google Translate supports 108 languages, which means that you can use the GOOGLETRANSLATE function to translate text between all of these languages in Google Sheets. See the table below for language codes to use with the GOOGLETRANSLATE function.
|Hebrew||he or iw|
|Portuguese (Portugal, Brazil)||pt|
To fully commit this function to memory you need to get some hands on experience. Try some practice problems with the GOOGLETRANSLATE function in our interactive Google Sheets Tutorial now!