To enable spell checking in TX Text Control based applications, you simply need to connect TX Text Control with TX Spell .NET. TX Spell .NET is loading the required dictionaries automatically from the default dictionary folder. Since version TX Text Control X10 and TX Spell .NET 4.0, dictionaries are loaded based on the new Culture at the input position.

Consider the following example: If the input language is English, the best match English dictionary is loaded. If the input language switches to German, a German dictionary is loaded automatically. As a developer, you don't need to care about loading matching dictionaries.

Loading dictionaries dynamically in TX Spell .NET

Loading Dictionaries from Shared Locations

But there are scenarios where dictionaries are not loaded from the default local dictionary folder, but must be loaded from a shared location or database. In this case, the dictionaries must be added to the Dictionaries collection:

TXTextControl.Proofing.OpenOfficeDictionary dic =
        new TXTextControl.Proofing.OpenOfficeDictionary("de_DE_frami.dic");
txSpellChecker1.Dictionaries.Add(dic);

The language of the OpenOfficeDictionaries are recognized automatically, so that these added dictionaries are used based on the culture of the input position.

User Dictionaries

User dictionaries can be loaded from files or from memory in the same way like OpenOffice dictionaries. But on loading a user dictionary, you need to specify the Language:

TXTextControl.Proofing.UserDictionary userDic =
        new TXTextControl.Proofing.UserDictionary("userDic.txd");
userDic.Language = new System.Globalization.CultureInfo("en-US");
txSpellChecker1.Dictionaries.Add(userDic);

Provide your users a true multi-language experience and add as many dictionaries as required at the same time to your application.