This is a migrated thread and some comments may be shown as answers.

Customizing En-US dictionary

1 Answer 62 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 11 Sep 2014, 02:48 PM
I would like to add a set of industry specific words to the En-US dictionary. What is the best way to do this since the dictionary is embedded in the Telerik.Windows.Documents.Proofing.Dictionaries.En-US dll. I don't want to use a custom dictionary, because users will each have their own custom dictionary.

1 Answer, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 15 Sep 2014, 12:49 PM
Hi Chris,
You can implement your own dictionary containing the words of the original one. The implementation is relatively simple, assuming you have the proper .tdf file added as 'Resource':
[WordDictionaryMetadata("")]
public class RadEn_USExtendedDictionary: RadDictionary
{
    public RadEn_USExtendedDictionary()
    {
    }
 
    protected override void EnsureDictionaryLoadedOverride()
    {
        Stream stream = Application.GetResourceStream(new Uri("YourCustomAssemblyName;component/en-USExtended.tdf", UriKind.Relative)).Stream;
        this.Load(stream);
    }
}

You can find attached the original tdf file for US English, and further modify it, for example using the tool from Creating a Custom RadSpell Dictionary blogpost (this is from the UI for ASP.NET AJAX Forum, but the format is the same).

Regards,
Boby
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
RichTextBox
Asked by
Chris
Top achievements
Rank 1
Answers by
Boby
Telerik team
Share this question
or