This guide outlines the main steps on how to exclude certain words from the dictionary by creating a special exclude dictionary. Such a dictionary is similar to the global custom dictionaries. You can find it useful when excluding certain words from any supported language dictionaries. For more details, refer to this article.
You can start adding and configuring excluded words after you have installed the server version of the WebSpellChecker application to the server. It is not enabled in the [WebSpellChecker installation folder]/AppServer/AppServerX.xml file by default. You can enable it using the procedure described below where we excluded certain words from the English language dictionary.
To exclude certain words from the English dictionary:
- Navigate to the [WebSpellChecker_installation_folder]/AppServer directory.
Create a .tlx file and add the words intended for excluding to it. To do so, in the "[WebSpellChecker_installation_folder]/AppServer/LanguageDictionaries" folder, create the "en_exclude.tlx" file and add the word 'mango' to it.
The required file format for excluding wordlists is a text file saved with *.tlx extension.
The required file format for excluding wordlists is a text file saved with *.tlx extension. A wordlist must be in UTF-8 format where each word is located in a new line.
- Stop AppServer before editing the AppServerX.xml file.
In the [WebSpellChecker_installation_folder]/AppServer directory, navigate to the AppServerX.xml file.
Find the language tag with a setting for a required language. In our case, this is American English. In this tag, add a new tag with the path to a newly created file (see step 2) containing the list of words for excluding:
Activate the exclude functionality specifying the <ForExclude>true</ForExclude> tag.
Start AppServer for the changes to take effect.
The word 'mango' should become an excluded one: it will be considered as a misspelling and red-marked accordingly.