TX Text Control .NET for WPF

IsLanguageDetectionEnabled Property

Property|Introduced in 21.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.Server.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets a value indicating whether language detection is active or not. If language detection is enabled, a language is automatically set for all pieces of text with a neutral language. To use this feature, at least the TXSpell 5.0 spell checking component must be connected with the ServerTextControl through the SpellChecker property.

Syntax

public bool IsLanguageDetectionEnabled { get; set; }

Examples

The following example uses ServerTextControl.IsLanguageDetectionEnabled to enable automatic language detection. The configured value is checked before the workflow continues.

textControl.IsLanguageDetectionEnabled = true;
if (textControl.IsLanguageDetectionEnabled)
{
    Console.WriteLine("Server Text Control: Is Language Detection Enabled is enabled.");
}