Spellex SDK for ActiveX - Technical Support

Product: Spellex ActiveX, any version

Question: How can I set up my application so it uses the Dutch, French, German, etc. dictionaries instead of English?

Answer: Use the dictionaries the same way you use the American, Canadian, or British English dictionaries. Spellex Software's Dictionary products for each language include three files: sscexx.tlx, sscexx1.clx, and sscexx2.clx (the xx in each name is a 2-letter language code). The sscexx1.clx file (and any other files that may be included) is for other Spellex spelling products and should not be used with Spellex ActiveX.

Instructions on using the dictionary with Spellex ActiveX are given in documentation (readme.htm file) included with the dictionary. In some cases, it is necessary to enable or disable certain Spellex ActiveX options. For example, If you use the German or Finnish dictionaries, your application should set the SplitWords property to True. If you use the French or Italian dictionaries, your application should set the SplitContractedWords option to True. Again, follow the instructions which accompany the dictionary product to determine the appropriate set of option changes.

Normally, you set Spellex ActiveX's MainDictionaryFiles property to the list of dictionary files for the language you want to use. For example, to check spelling in Danish, you would set MainDictionaryFiles like this:

MainDictionaryFiles = "ssceda.tlx,ssceda2.clx"

One thing you should not do is set MainDictionaryFiles to the files for more than one language at the same time. Doing so would increase the probability that a misspelled word in one language would match a valid word in another language, and therefore go undetected. Unless you have some very specific requirement (e.g., you want to detect words that are not common to French and Dutch), you should set MainDictionaryFiles to the set of files for one language only.

It's also important to note that Spellex ActiveX cannot, by itself, detect the language of text submitted to it for checking and automatically use the appropriate dictionary files and property settings. If there is no better way to determine the language of text entered by the user, your application can use Spellex ActiveX to "guess" the language, and the approach to use in doing so is described below.

Ideally, the users of your application will indicate the language of the text they enter. Depending on the needs of your application and its users, this indication may be more or less permanent (e.g., a selection made during installation of your application, where re-installation is required to change it) or quite variable (e.g., your application provides a way of assigning a language attribute to text, so words in the same sentence could use different language attributes).

If the user's language preference changes infrequently, the best approach is to configure Spellex ActiveX's MainDictionaryFiles property and other language-sensitive properties once, each time your application starts. An easy way to achieve this is via a table of language properties, indexed by the preferred language. The language properties would include the settings of the following properties:

  • MainDictionaryFiles
  • SplitContractedWords
  • SplitWords
  • AllowAccentedCaps

The specific values of these properties for each language are documented in the readme.htm file included with Spellex Software's dictionary products. Any unaffected properties should be left at their default values, which are documented in the Spellex ActiveX Programmer's Guide.

If the user changes their language preference, Spellex ActiveX's properties would be set from values in the table corresponding to the new language selection.

If the user's language preference changes very frequently, a more time-efficient approach would be to declare multiple instances of Spellex ActiveX, and configure MainDictionaryFiles and other language-sensitive properties of each instance for a specific language. To check spelling in Brazilian Portuguese, for example, you would use the instance of Spellex ActiveX configured for Brazilian Portuguese. Note that this approach would consume more memory than a single instance of Spellex ActiveX that was reconfigured when the language preference changed.

"Guessing" the language

In situations where a user is unavailable to specify the language of text to be checked, or where the language of text is unknown and must be determined programmatically, the following approach can be used: Check the spelling of the text (or sample text) using Spellex ActiveX configured for each available language in turn (without interacting with the user) and count the number of misspelled words detected. The language which results in the smallest number of misspelled words is probably the right one. Of course, the text must contain a good variety of words (not just a list of telephone numbers, or the same word repeated, for example) and a large number of words, for the results to be statistically meaningful.

Home | Order Now | Products | Upgrades | Free Trial | Partners | About Spellex | Contact Us | Site Map | Privacy Policy

Spellex Corporation © 2008. All rights reserved