in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Setting up UK Dictionary

Last post 9/12/2008 2:29 AM by David Leckenby. 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 8/19/2008 5:16 AM

    Setting up UK Dictionary

     Any help on getting the required files for a (British) English dictionary would be appreciated as I have had little success with the set up of dictionaries.

  • 9/12/2008 2:29 AM In reply to

    Re: Setting up UK Dictionary

    I just set up an Australian one using the OpenOffice dictionary and it was reasonably straight foward.

    Here's what I did, modifying it for a UK dictionary should be obvious:

    1. Create a new Windows Forms project, add a spell check control and a MemoEdit to the form.
    2. Download the OpenOffice dictionary files from here: http://wiki.services.openoffice.org/wiki/Dictionaries and add the en_AU.dic and en_AU.aff files to the project.
    3. For both files, set the property: Copy to Output Directory to Copy if newer.
    4. Add the following code to FormLoad event:

    Dim auDic As New SpellCheckerOpenOfficeDictionary
    auDic.Culture =
    New CultureInfo("en-AU")
    auDic.DictionaryPath =
    "en_AU.dic"
    auDic.GrammarPath = "en_AU.aff"

    Dim auCustomDic As New SpellCheckerCustomDictionary()
    auCustomDic.Culture =
    New CultureInfo("en-AU")
    auCustomDic.AlphabetPath =
    "EnglishAlphabet.txt"
    auCustomDic.DictionaryPath = "CustomEnglish.dic"

    Dim sharedDic As New SharedDictionaryStorage
    sharedDic.Dictionaries.Add(auDic)
    sharedDic.Dictionaries.Add(auCustomDic) 

    SpellChecker1.UseSharedDictionaries = True

     You also need these imports:

    Imports DevExpress.XtraSpellChecker
    Imports System.Globalization 

    Run the project, type some text in the memo edit, right click it and choose spell check.

Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED