Skip to main content Skip to footer

Merge Multiple Dictionaries using C1DictionaryEditor

The C1SpellChecker provides 21 international dictionaries in addition to the English - US dictionary that is built into the control. However, you may want to merge two dictionaries into one. To do this we will use a C1SpellChecker Dictionary Editor called C1DictionaryEditor.exe that allows us to create and maintain dictionary files (.dct). Through this post we will merge Spanish and French dictionaries into one dictionary. The process is quite simple. 1. Create a new dictionary using C1DictionaryEditor. 2. Create one wordlist each, for Spanish and French. 3. Copy and paste the rules and wordlists from the default dictionaries into the new one. 4. Use the newly created dictionary in the application. We will start with the creation of a new dictionary. Open C1DictionaryEditor from the start menu and click on the 'New' button. Name the dictionary as 'MyDictionary.dct'. When a new dictionary is created it contains two files -- rules (containing the rules of a language) and main.words (containing the words in a dictionary). We will name the word list as Spanish.words. After this, open another instance of C1DictionaryEditor and open the C1Spell_es-ES.dct dictionary. This dictionary is installed in C:\Program Files\ComponentOne\Dictionaries when the Studio for Winforms is installed. Open the es-ES.words wordlist and select all words. Right click on the selected list and select Copy option from the context menu to select all the words. Switch to Dictionary Editor Window of MyDictionary, click on Spanish.words list, and right click on the content. Select the Select All option, and then select Paste to paste the copied words from Spanish dictionary. Next step is to add a French wordlist in MyDictionary. To do this click on the New Wordlist button and then rename the wordlist as French.words. Likewise, open the C1Spell_fr-FR.dct dictionary and copy the word list and paste it in French.words list in MyDictionary. Another thing that we need to do here is to copy and paste the rules of French dictionary. Copy the rules from the French dictionary and paste them into rules for MyDictionary. Save the changes in MyDictionary. We now have a dictionary which contains both French and Spanish words. We have attached a small application in which the first instance of C1SpellChecker uses C1Spell_es-ES.dct, the second uses C1Spell_fr-FR.dct, and the third uses MyDictionary.dct. The texts in Richtextboxes are spellchecked by these spellcheckers and the content is spellchecked according to the selected dictionary. The third spellchecker spell checks both French and Spanish text. Download Sample

MESCIUS inc.

comments powered by Disqus