GOOGLETRANSLATE Function in Google Sheets: Explained
In this article, you will learn how to use the GOOGLETRANSLATE formula in Google Sheets.
What is the function of GOOGLETRANSLATE?
The GOOGLETRANSLATE function in Google Sheets is a built-in function that allows you to translate text from one language to another using the Google Translate service. You can specify both a source language and a target language or command the formula to detect language and translate it to your default language.
If you collaborate with your colleagues using different languages, this function may help you communicate with them more efficiently. Note that the GOOGLETRANSLATE function is only available in Google Sheets and not in the compatible spreadsheet.
How do I use the GOOGLETRANSLATE function?
To use the GOOGLETRANSLATE formula in Google Sheets, follow these steps:
- Type "=GOOGLETRANSLATE"
- Input the text to translate by cell reference or manual input. Don’t forget to enclose it for manual input.
- Enter source and target language codes if you want to specify them. This step is recommended to increase the accuracy of the translation. You can also skip this step.
The general syntax of the GOOGLETEANSLATE formula is as follows:
text: This is the text you want to translate.
source_language [Optional]: You can enter a code assigned to each language available for translation, such as “en” for (American) English or “es” for Spanish. If this argument is left blank, the formula considers this argument “auto” by default.
target_language [Optional]: Same as the “source_language”.
Note: If the “source_language” is omitted, the “target_language” must be removed, and vice versa.
For example, to translate the text "Hello" from English to Spanish, you could use the following formula:
This would return the translation "Hola".
If you wanted to translate the text "Bonjour" from French to English, you could use the following formula:
This would return the translation "Hello".
The following screenshot shows examples in which we use cell references to fill arguments in the GOOLGETRANSLATE function.
As we mentioned in the note above, and as you can see in the next image, the formula works without the optional arguments. However, the outcome in the second example needs to be correct, which indicates this function is beneficial but could be better.
The third example shows that the formula works with “auto” code instead of specific language codes.
The fourth and sixth examples show that the formula doesn’t work with one of the optional arguments filled and returns a #VALUE error. As we mention in the note, you need to enter both optional parameters or leave them blank.
As shown in the fifth and seventh examples, you can combine “auto” with another particular language code in the formula.
Do you have a list of language codes?
Yes. Refer to the following table (source: https://developers.google.com/admin-sdk/directory/v1/languages) and find the language codes you are looking for. Note that not all languages are covered by this translation function. (Note this list covers major languages but it is not comprehensive)
How can you detect a language in Google Sheets?
You can use the DETECTLANGUAGE function in Google Sheets. Reference the following article to learn how to use the DETECTLANGUEGE formula in Google Sheets.
DETECTLANGUAGE Function in Google Sheets: Explained