New Translation Functions in Excel
1 July 2024
There are two new Preview functions coming to Excel. Be careful using these: their signature and results may change substantially before being broadly released, based upon feedback from those fortunate enough to be able to access them. Therefore, we strongly recommend you do not rely on these functions in important workbooks until they are Generally Available.
The two new translation functions out in Preview now are TRANSLATE and DETECTLANGUAGE.
Microsoft is introducing these two new functions to simplify and automate translations directly within your spreadsheet:
- TRANSLATE: a function that translates a text from one language to another
- DETECTLANGUAGE: a function that detects the language of the specified text.
TRANSLATE
TRANSLATE takes text you provide and translates it from one language to another using Microsoft Translation Services. Currently, there are 133 languages supported – including two variations of Klingon!!
At the time of writing, these are:
- Afrikaans
- Albanian
- Amharic
- Arabic
- Armenian
- Assamese
- Azerbaijani (Latin)
- Bangla
- Bashkir
- Basque
- Bhojpuri
- Bodo
- Bosnian (Latin)
- Bulgarian
- Cantonese (Traditional)
- Catalan
- Chinese (Literary)
- Chinese Simplified
- Chinese Traditional
- chiShona
- Croatian
- Czech
- Danish
- Dari
- Divehi
- Dogri
- Dutch
- English
- Estonian
- Faroese
- Fijian
- Filipino
- Finnish
- French
- French (Canada)
- Galician
- Georgian
- German
- Greek
- Gujarati
- Haitian Creole
- Hausa
- Hebrew
- Hindi
- Hmong Daw (Latin)
- Hungarian
- Icelandic
- Igbo
- Indonesian
- Inuinnaqtun
- Inuktitut
- Inuktitut (Latin)
- Irish
- Italian
- Japanese
- Kannada
- Kashmiri
- Kazakh
- Khmer
- Kinyarwanda
- Klingon
- Klingon (plqaD)
- Konkani
- Korean
- Kurdish (Central)
- Kurdish (Northern)
- Kyrgyz (Cyrillic)
- Lao
- Latvian
- Lithuanian
- Lingala
- Lower Sorbian
- Luganda
- Macedonian
- Maithili
- Malagasy
- Malay (Latin)
- Malayalam
- Maltese
- Maori
- Marathi
- Mongolian (Cyrillic)
- Mongolian (Traditional)
- Myanmar
- Nepali
- Norwegian
- Nyanja
- Odia
- Pashto
- Persian
- Polish
- Portuguese (Brazil)
- Portuguese (Portugal)
- Punjabi
- Queretaro Otomi
- Romanian
- Rundi
- Russian
- Samoan (Latin)
- Serbian (Cyrillic)
- Serbian (Latin)
- Sesotho
- Sesotho sa Leboa
- Setswana
- Sindhi
- Sinhala
- Slovak
- Slovenian
- Somali (Arabic)
- Spanish
- Swahili (Latin)
- Swedish
- Tahitian
- Tamil
- Tatar (Latin)
- Telugu
- Thai
- Tibetan
- Tigrinya
- Tongan
- Turkish
- Turkmen (Latin)
- Ukrainian
- Upper Sorbian
- Urdu
- Uyghur (Arabic)
- Uzbek (Latin)
- Vietnamese
- Welsh
- Xhosa
- Yoruba
- Yucatec Maya
- Zulu.
As mentioned above, the TRANSLATE function allows you to translate text from one language to another in Microsoft Excel by using Microsoft Translation Services. The full signature is:
TRANSLATE(text, [source_language], [target_language])
This function has the following arguments:
- text: the text to translate. This value should either be enclosed in quotation marks or be a reference to a cell containing the appropriate text
- source_language (optional): the language code of the source language (e.g. "en" for English or "es" for Spanish). If not specified, the language will be automatically detected based upon the text provided. Auto-detection is supported for most languages. It is recommended to specify the language if known, especially for shorter texts
- target_language (optional): the language code of the target language (e.g. "en" for English or "es" for Spanish). If not specified, the system language will be used as the target language.
The supported languages and their respective language codes are as follows:
Suppose you have the following text in cell A1: "Hello, World!" and you want to translate it to Spanish. You can use the TRANSLATE function as follows:
=TRANSLATE(A1, "en", "es")
In this example, the source language is English (en) and the target language is Spanish (es). The translated text, "Hola mundo!" will be displayed in the cell where you entered the formula.
Alternatively, you may just type the text in, viz.
Common errors include the following:
- Text Too Long: you have too many characters in a cell. Reduce your cell size and try again
- Error in Value: you have a non-text value in your cell. The function only accepts a text argument
- Invalid Language: you have entered an invalid language code or one not presently supported (see above)
- Request Throttled: you have exceeded your daily quota of the translation function (now that is interesting, but we are not quite sure what that means at the time of writing).
DETECTLANGUAGE
DETECTLANGAUGE detects the language of text you provide using the Microsoft Translation Services and returns the language code. The full signature is:
DETECTLANGUAGE(text)
The function has the following arguments:
- text: the text or reference to cells containing text to evaluate.
The supported languages and their respective language codes are as above.
Suppose you have the following text in cell A1: "Hola mundo!" and you want to find out what the language of the text is. You can use the DETECTLANGUAGE function as follows:
=DETECTLANGUAGE(A1)
This will return the detected language for the text in cell A1. The language code "es" for Spanish will be displayed in the cell where you entered the formula.
Alternatively, you may just type the text in, viz.
Common errors include the following:
- Text Too Long: you have too many characters in a cell. Reduce your cell size and try again
- Error in Value: you have a non-text value in your cell. The function only accepts a text argument
- Invalid Language: you have entered an invalid language code or one not presently supported (see above)
- Request Throttled: you have exceeded your daily quota of the translation function.
These functions are currently available to some Beta Channel users running:
- Windows: Version 2407 (Build 16.0.17808.20000) or later
- Mac: 16.87 (Build 24062430) or later.
We say “some” as we haven’t access yet. 😢
As always, we'll be providing details in our August newsletter. Please remember we have virtual / online training in Excel which you can find out more about here. If you are not already a subscriber, why not sign up at the bottom of any SumProduct web page?