# TXSpell.DetectLanguageScopes Method

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

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 5.0
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TXSpell.Core.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.dll` from the setup
- **Path:** TX Spell .NET for WPF > Reference > TXTextControl.Proofing > TXSpell.DetectLanguageScopes Method
- **448 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/detectlanguagescopes-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/detectlanguagescopes-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/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 [TXSpell.LanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/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 workflow. The created object is then available to the surrounding document workflow.

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

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

### Remarks

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

---

## Nearby

- **Previous:** [TXSpell.DetectableLanguageScopes Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/detectablelanguagescopes-property/llms-full.txt)
- **Next:** [TXSpell.DialogStartPosition Enumeration](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell-dialogstartposition/enumeration/llms-full.txt)
