How to configure different language in SfSpellChecker?
SfSpellChecker control provides a simple and intuitive interface to check for spelling errors in text editor controls and it will also provide suggestions for the misspelled words through dialog and context menu. It supports English language by default and offers support to configure required language by using its CustomDictionary support.
Step 1: Need to create dictionary file for user desired language and add necessary words details in it.
Step 2: Then need to attach it with the application and define this file location in its property named CustomDictionaryPath.
Step 3: SfSpellChecker will function based on the newly defined Custom Dictionary Language.
Here, we have prepared example for configuring following languages in SfSpellChecker.
- Czech Language
- German Language
- French Language
1. Czech Language
The Czech language can be customized.
The following Code sample demonstrates the same.
C#
SpellChecker = new SfSpellChecker(); //set CustomDictonaryPath for Czech Language SpellChecker.CustomDictionaryPath = "Czech.txt";
VB
SpellChecker = New SfSpellChecker() 'set CustomDictonaryPath for Czech Language SpellChecker.CustomDictionaryPath = "Czech.txt"
Screenshot
Figure 1: Czech language customization.
2. German Language
The German language can be customized.
The following Code sample demonstrates the same.
C#
SpellChecker = new SfSpellChecker(); //set CustomDictonaryPath for Czech Language SpellChecker.CustomDictionaryPath = "German.txt";
VB
SpellChecker = New SfSpellChecker() 'set CustomDictonaryPath for Czech Language SpellChecker.CustomDictionaryPath = "German.txt"
Screenshot
Figure 2: German language Customization.
3. French Language
The French language can be customized.
The following Code sample demonstrates the same.
C#
SpellChecker = new SfSpellChecker(); //set CustomDictonaryPath for Czech Language SpellChecker.CustomDictionaryPath = "French.txt";
VB
SpellChecker = New SfSpellChecker() 'set CustomDictonaryPath for Czech Language SpellChecker.CustomDictionaryPath = "French.txt"
Screenshot
Figure 3: French language Customization.