Text functions
DETECTLANGUAGE
Deferred: needs an outside service
Deferred by policy: the answer needs Microsoft's language service. DNA Calc does not run this function yet. How we measure this
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | DETECTLANGUAGE |
| Bulgarian | DETECTLANGUAGE |
| Czech | DETEKOVATJAZYK |
| Danish | REGISTRERSPROG |
| German | DETECTLANGUAGE |
| Greek | DETECTLANGUAGE |
| English (Australia) | DETECTLANGUAGE |
| English (United Kingdom) | DETECTLANGUAGE |
| English (United States) | DETECTLANGUAGE |
| Spanish | DETECTARIDIOMA |
| Estonian | DETECTLANGUAGE |
| Finnish | TUNNISTAKIELI |
| French | DÉTECTERLANGUE |
| Hebrew | DETECTLANGUAGE |
| Croatian | DETECTLANGUAGE |
| Hungarian | NYELVFELISMERÉS |
| Indonesian | DETECTLANGUAGE |
| Italian | DETECTLANGUAGE |
| Japanese | DETECTLANGUAGE |
| Korean | DETECTLANGUAGE |
| Lithuanian | DETECTLANGUAGE |
| Latvian | DETECTLANGUAGE |
| Norwegian | DETECTLANGUAGE |
| Dutch | TAALDETECTEREN |
| Polish | WYKRYJJĘZYK |
| Portuguese (Brazil) | DETECTLANGUAGE |
| Portuguese (Portugal) | DETETARIDIOMA |
| Romanian | DETECTLANGUAGE |
| Russian | ОПРЕДЕЛИТЬЯЗЫК |
| Slovak | DETECTLANGUAGE |
| Slovenian | DETECTLANGUAGE |
| Serbian (Latin) | DETECTLANGUAGE |
| Swedish | IDENTIFIERASPRÅK |
| Thai | DETECTLANGUAGE |
| Turkish | DİLİALGILA |
| Ukrainian | DETECTLANGUAGE |
| Vietnamese | DETECTLANGUAGE |
| Chinese (Simplified) | DETECTLANGUAGE |
| Chinese (Hong Kong) | DETECTLANGUAGE |
| Chinese (Traditional) | DETECTLANGUAGE |
Names from Microsoft's support site.
What it does
DETECTLANGUAGE(text)
DETECTLANGUAGE asks Microsoft Translation Services which language some text is in, and returns a language code such
as es. It returns a code, not a language name.
DETECTLANGUAGE(text) takes text, or a reference to cells holding text.
=DETECTLANGUAGE("Hola mundo!")
Try it
DNA Calc does not run this function yet: its answer needs an outside service. In Excel you would write:
=DETECTLANGUAGE("Hello world")Quirks
- One answer, no confidence. There is no score, so an ambiguous word gets a definite-looking code.
- Answers may change. Microsoft calls this a service-backed function, whose languages can change over time.
- Numbers are not read as text. Microsoft describes a non-text value as an error, unlike the ordinary conversion of numbers to text.
- Undocumented cases: empty text, mixed-language text, and whether a multi-cell reference spills.
When the service is unavailable
Microsoft documents three failure messages:
| Message | Meaning |
|---|---|
| Text Too Long | The cell holds too many characters; no figure is given |
| Error in Value | The input is not text |
| Request Throttled | The daily quota is used up; no figure is given |
The page does not say what appears with no connection. This has not been measured here.
How to implement
DNA Calc does not run this function yet. It is deferred by policy, because the answer depends on a back end Microsoft hosts and controls. An implementation needs:
- A language classifier. Another model will disagree on short and mixed text, so it cannot promise Excel's answers.
- The code vocabulary of the service, kept current.
- Asynchronous calculation with caching, and the documented failures.
- Measured argument rules: non-text values, empty text and multi-cell references.
Rust code
This entry has no Rust implementation yet.
No implementation has been published with a Handbook test suite for this function.
Version differences
No Excel answers for this function are recorded here, so no comparison between Excel builds exists. Microsoft's page lists Excel for Microsoft 365 on Windows and Mac and Excel Mobile. Service updates can change answers with no Excel build changing.
Alternatives
TRANSLATEwithsource_languageomitted, when only the translation matters.- A column of known language codes, when the source of the text is known.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents