Language Property
- Namespace
TXTextControl.Proofing
- Package
TXTextControl.asTXSpell. WinForms. SDK TXSpell.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Gets or sets the name of a dictionary that is located at the default dictionary folder. Using the Language property, the Dictionary.IsSelectedAsDefault property of the chosen dictionary is set to true. The default value is "(Auto)".
Syntax
public string Language { get; set; }Public Property Language As StringMembers
| Value | Description |
|---|---|
| "__.dic" | The corresponding OpenOfficeDictionary is added to the TXSpellChecker.Dictionaries collection (e.g. "en_US.dic" for the US english dictionary). |
| "__.txd" | The corresponding UserDictionary is added to the TXSpellChecker.Dictionaries collection (e.g. "MyUserDictionary.txd" for an user dictionary that is located in the default dictionary folder). |
| "(Auto)" | That Dictionary is added to the TXSpellChecker.Dictionaries collection that equals the language of the application environment. If the default dictionary folder does not contain such a dictionary, a dictionary is chosen that corresponds roughly to the environment language (e.g. the application environment is "en_GB", but the default dictionary folder only contains an "en_US" and a "de_DE" dictionary. In this case, the "en_US" dictionary is chosen.). In all other cases (e.g. a German environment, but no German dictionary available) the "en_US" dictionary or (if no "en_US" dictionary available) the first dictionary in the default dictionary folder is loaded. The TXSpellChecker.Language Property is set to "(none)", if the default dictionary folder does not contain any dictionaries. |
| "(none)" | No dictionary is set. |
Examples
The following example uses TXSpellChecker.Language to configure language as part of the txspell checker workflow. The configured value is checked before the workflow continues.
tXSpellChecker.Language = "Quarterly report";
if (!string.IsNullOrWhiteSpace(tXSpellChecker.Language))
{
Console.WriteLine($"Language: {tXSpellChecker.Language}");
}tXSpellChecker.Language = "Quarterly report"
If Not String.IsNullOrWhiteSpace(tXSpellChecker.Language) Then
Console.WriteLine($"Language: {tXSpellChecker.Language}")
End IfRemarks
The property is reset to "(Auto)", if there is no corresponding dictionary in the default dictionary folder and to "(none)", if the directory contains no dictionary.