TX Spell .NET for Windows Forms

DetectLanguageScopes Method

Method|Introduced in 5.0
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WinForms.SDK as TXSpell.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

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

Syntax

public void DetectLanguageScopes(string text);

Parameters

ParameterDescription
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.

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 property.