# TXSpellChecker.DetectLanguageScopes Method

> Detects language scopes in a text and fills the results into the LanguageScopeCollection at TXSpellChecker.LanguageScopes.

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 5.0
- **Namespace:** `TXTextControl.WPF.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.SDK` (assembly `TXSpell.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.WPF.dll` from the setup
- **Path:** TX Spell .NET for WPF > Reference > TXTextControl.WPF.Proofing > TXSpellChecker.DetectLanguageScopes Method
- **462 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectlanguagescopes-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectlanguagescopes-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectlanguagescopes-method/llms-full.txt

---

### Description

Detects [language scopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/llms-full.txt) in a text and fills the results into the [LanguageScopeCollection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/llms-full.txt) at [TXSpellChecker.LanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/languagescopes-property/llms-full.txt).

### Syntax

```csharp
public void DetectLanguageScopes(string text);
```

```vbnet
Public Sub DetectLanguageScopes(text As String)
```

### Parameters

| Parameter | Description |
|---|---|
| text | Specifies the text where to detect language scopes. |

### Examples

The following example uses Detect Language Scopes in a focused TXSpell Checker workflow. The created object is then available to the surrounding document workflow.

```csharp
tXSpellChecker.DetectLanguageScopes("Quarterly results");
Console.WriteLine("TXSpell Checker is ready for use.");
```

```vbnet
tXSpellChecker.DetectLanguageScopes("Quarterly results")
Console.WriteLine("TXSpell Checker is ready for use.")
```

### Remarks

The languages that are used to detect language scopes in a text can be defined by the [TXSpellChecker.DetectableLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectablelanguagescopes-property/llms-full.txt) property.

---

## Nearby

- **Previous:** [TXSpellChecker.DetectableLanguageScopes Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectablelanguagescopes-property/llms-full.txt)
- **Next:** [TXSpellChecker.DialogButtonClicked Event](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/dialogbuttonclicked-event/llms-full.txt)
