TX Spell .NET for WPF

Language Property

Property|Introduced in 3.0
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WPF.SDK as TXSpell.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TXSpell.Core.SDK as TXSpell.dll

Description

Gets or sets the dictionary's language.

Syntax

public CultureInfo Language { get; set; }

Examples

The following example uses Dictionary.Language to configure language as part of the dictionary workflow. The configured value is checked before the workflow continues.

dictionary.Language = System.Globalization.CultureInfo.GetCultureInfo("en-US");
if (dictionary.Language != null)
{
    Console.WriteLine("Dictionary: Language is available.");
}

Remarks

The property is automatically set, if the name of the dictionary file contains language specific information (e.g. "en_medical.txd" for English or "de_CH_frami.dic" for German (Switzerland)). Otherwise, the property returns null.