Language Property
- Namespace
TXTextControl.Proofing
- Package
TXTextControl.asTXSpell. WinForms. SDK TXSpell.from the private NuGet feed or Text Control Offline Packagesdll
- Also in
TXTextControl.asTXSpell. Core. SDK TXSpell.dll
Description
Gets or sets the name of a dictionary that is located at the default dictionary folder. When 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 TXSpell.Dictionaries collection (e.g. "en_US.dic" for the US english dictionary). |
| "__.txd" | The corresponding UserDictionary is added to the TXSpell.Dictionaries collection (e.g. "MyUserDictionary.txd" for an user dictionary that is located inside the default dictionary folder). |
| "(Auto)" | That Dictionary is added to the TXSpell.Dictionaries collection that equals to 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 inside the default dictionary folder is loaded. The TXSpell.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 TXSpell.Language to configure language as part of the txspell workflow. The configured value is checked before the workflow continues.
tXSpell.Language = "Quarterly report";
if (!string.IsNullOrWhiteSpace(tXSpell.Language))
{
Console.WriteLine($"Language: {tXSpell.Language}");
}tXSpell.Language = "Quarterly report"
If Not String.IsNullOrWhiteSpace(tXSpell.Language) Then
Console.WriteLine($"Language: {tXSpell.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.