{
  "category": "Text functions",
  "display_name": "DETECTLANGUAGE",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.DETECTLANGUAGE",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Deferred by policy: the answer needs Microsoft's language service. DNA Calc does not run this function yet.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": false,
    "state": "deferred",
    "state_label": "Deferred: needs an outside service",
    "summary": "Deferred: needs an outside service",
    "workbook_corpus": null
  },
  "implementations": [],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.DETECTLANGUAGE.json",
  "name": "DETECTLANGUAGE",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n- `TRANSLATE` with `source_language` omitted, when only the translation matters.\n- A column of known language codes, when the source of the text is known.\n\n\n",
    "how-to-implement": "\nDNA Calc does not run this function yet. It is deferred by policy, because the answer depends on a back end Microsoft\nhosts and controls. An implementation needs:\n\n1. **A language classifier.** Another model will disagree on short and mixed text, so it cannot promise Excel's answers.\n2. **The code vocabulary** of the service, kept current.\n3. **Asynchronous calculation** with caching, and the documented failures.\n4. **Measured argument rules:** non-text values, empty text and multi-cell references.\n\n\n",
    "quirks": "\n- **One answer, no confidence.** There is no score, so an ambiguous word gets a definite-looking code.\n- **Answers may change.** Microsoft calls this a service-backed function, whose languages can change over time.\n- **Numbers are not read as text.** Microsoft describes a non-text value as an error, unlike the ordinary conversion\n  of numbers to text.\n- **Undocumented cases:** empty text, mixed-language text, and whether a multi-cell reference spills.\n\n### When the service is unavailable\n\nMicrosoft documents three failure messages:\n\n| Message | Meaning |\n|---|---|\n| Text Too Long | The cell holds too many characters; no figure is given |\n| Error in Value | The input is not text |\n| Request Throttled | The daily quota is used up; no figure is given |\n\nThe page does not say what appears with no connection. This has not been measured here.\n\n\n",
    "sources": "\n- [DETECTLANGUAGE function](https://support.microsoft.com/en-us/excel/functions/detectlanguage-function)\n- [TRANSLATE function](https://support.microsoft.com/en-us/excel/functions/translate-function)\n\n",
    "version-differences": "\nNo 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\nupdates can change answers with no Excel build changing.\n\n\n",
    "what-it-does": "\n`DETECTLANGUAGE` asks Microsoft Translation Services which language some text is in, and returns a language code such\nas `es`. It returns a code, not a language name.\n\n`DETECTLANGUAGE(text)` takes text, or a reference to cells holding text.\n\n```\n=DETECTLANGUAGE(\"Hola mundo!\")\n```\n\n\n"
  },
  "signature": {
    "display": "DETECTLANGUAGE(text)",
    "parameters": [
      {
        "description": null,
        "name": "text",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "deferred",
        "reason": "Deferred by policy: the answer needs Microsoft's language service. DNA Calc does not run this function yet."
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Text functions",
      "classification": {},
      "descriptions": {
        "long": null,
        "short": "Code of the language a text is written in",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Identifies the language of a specified text",
        "microsoft_url": "https://support.microsoft.com/en-us/office/detectlanguage-function-0748e285-1912-4d24-b735-57d18142fa3b"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "bg-BG",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "cs-CZ",
          "name": "DETEKOVATJAZYK"
        },
        {
          "locale": "da-DK",
          "name": "REGISTRERSPROG"
        },
        {
          "locale": "de-DE",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "el-GR",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "en-AU",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "en-GB",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "en-US",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "es-ES",
          "name": "DETECTARIDIOMA"
        },
        {
          "locale": "et-EE",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "fi-FI",
          "name": "TUNNISTAKIELI"
        },
        {
          "locale": "fr-FR",
          "name": "DÉTECTERLANGUE*"
        },
        {
          "locale": "he-IL",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "hr-HR",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "hu-HU",
          "name": "NYELVFELISMERÉS"
        },
        {
          "locale": "id-ID",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "it-IT",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "ja-JP",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "ko-KR",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "lt-LT",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "lv-LV",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "nb-NO",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "nl-NL",
          "name": "TAALDETECTEREN"
        },
        {
          "locale": "pl-PL",
          "name": "WYKRYJJĘZYK"
        },
        {
          "locale": "pt-BR",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "pt-PT",
          "name": "DETETARIDIOMA"
        },
        {
          "locale": "ro-RO",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "ru-RU",
          "name": "ОПРЕДЕЛИТЬЯЗЫК"
        },
        {
          "locale": "sk-SK",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "sl-SI",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "sv-SE",
          "name": "IDENTIFIERASPRÅK"
        },
        {
          "locale": "th-TH",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "tr-TR",
          "name": "DİLİALGILA"
        },
        {
          "locale": "uk-UA",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "vi-VN",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "zh-CN",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "zh-HK",
          "name": "DETECTLANGUAGE"
        },
        {
          "locale": "zh-TW",
          "name": "DETECTLANGUAGE"
        }
      ],
      "signature": {
        "display": "DETECTLANGUAGE(text)",
        "parameters": [
          {
            "description": null,
            "name": "text",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "DETECTLANGUAGE",
      "version_marker": null,
      "xlcall": null
    },
    "microsoft": "https://support.microsoft.com/en-us/office/detectlanguage-function-0748e285-1912-4d24-b735-57d18142fa3b"
  },
  "try_it": {
    "formula": "=DETECTLANGUAGE(\"Hello world\")",
    "note": "This example needs an Excel service or external provider that OneCalc cannot supply in this preview.",
    "preview_status": "refused"
  },
  "url": "https://handbook.dnacalc.com/functions/DETECTLANGUAGE.html",
  "variants": [],
  "versions": []
}