Knowledge Base > RichTextBox > Installation Knowledge Base Home | Login
Search the Knowledge Base
 
Start Search in the Following Category

How do I add a new language dictionary for the spell checker.

There are various options on how you can add new language dictionaries.

 

New dictionary files may be downloaded from the Additional Dictionaries section at -

http://www.richtextbox.com/richtextbox/support

 

1: Place the new .dictionary file within your web application /bin directory so that it beside your RichTextBox.DLL file.

 

This will allow the Spell Checker to automatically find the new dictionary without any other settings needed.

 

If your RichTextBox.DLL is in the GAC, or you wish to contain the .dictionary files in a separate folder, there are two options.

 

2: Global set the dictionary path for your app by adding a new key to your web.config file.

 

    Note: in the cases below we have created a folder/dir called dictionary in the root of our Web Application  

    'myapp'. This folder contains one or more dictionary files.

 

            e.g.

<appSettings>

<add key="RichTextBoxSpellCheckerDictionaryUrl" value="/myapp/dictionary "/>

</appSettings>

 

Or

 

<appSettings>

<add key="RichTextBoxSpellCheckerDictionaryPath" value="C:\webapps\myapp\dictionary"/>

</appSettings>

 

3: On the page (or in the page code) that contains the RichTextBox

e.g.

<script runat="server">

    private void Page_Load(object sender, System.EventArgs e)

    {

            myRTB.SpellCheckerDictionaryUrl = “/myapp/dictionary”;

 

            //OR

myRTB.SpellCheckerDictionaryPath = @" C:\webapps\myapp\dictionary";

    }

</script>

 

 

OR

 

            <RTB:RICHTEXTBOX id="myRTB" runat="server" SpellCheckerDictionaryUrl = “/myapp/dictionary”></RTB:RICHTEXTBOX>

 

            OR

 

            <RTB:RICHTEXTBOX id="myRTB" runat="server" SpellCheckerDictionaryPath=" C:\webapps\myapp\dictionary"></RTB:RICHTEXTBOX>

If our dictionary folder contained multiple dictionary files and one was a en-UK then the following code will  enforce the use of the en-UK dictionary.

In Page_Load -

this.Culture = "en-GB";

myRTB.SpellCheckerCultureBehavior = RichTextBoxControl.CultureBehavior.ServerCurrentCulture;

 




Did this page answer your question? If not, try the Forums or contact us.

Copyright Richer Components 2005. All rights reserved. No part of this article may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without the prior written permission of Richer Components. All brand names and product names used in this article are trade names, service marks, trademarks, or registered trademarks of their respective owners.


Knowledge Base Software - myKB.com