> For the complete documentation index, see [llms.txt](https://docs.aicrisk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aicrisk.com/admin/agent-scanner-defaults/language-detection.md).

# Language Detection

Detect foreign languages and syntax used in agent prompts:

<figure><img src="https://2455207419-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZwCwAN15BUJcXMA5avi%2Fuploads%2FbBHPoS9rUMo2dPtLR6Qt%2Fimage.png?alt=media&amp;token=fe1ba790-c348-4b3b-94d8-12761116d0ca" alt=""><figcaption></figcaption></figure>

**Purpose:** The Language Detection scanner is designed to automatically identify the language(s) used in text inputs.

**Functionality:** It analyzes the linguistic features of text data, such as vocabulary, syntax, and character n-grams, to determine the most likely language(s) present in the input.

**Implementation:** The scanner employs statistical language models or machine learning algorithms trained on multilingual text corpora to recognize patterns indicative of different languages. It may use techniques such as n-gram analysis, language-specific word lists, or deep learning models to improve accuracy.

**Usage:** Language Detection is commonly used in multilingual applications, text processing pipelines, and internationalization efforts to automatically adapt language-specific processing or content presentation based on user input.
