Tuesday, August 03, 2010

RadEditor for MOSS 2007 - Spell-check Multi-language Support

We use Telerik RadEditor for MOSS (5.6.2.0) as a cross-browser rich-text editor in one MOSS WCM publishing site to replace out-of-box Rich HTML field control. One great feature of the RadEditor is its AJAX spell checking function. By default, it would search against all three default dictionaries, English (en-US), French(fr-FR) and German(de-DE) that are included in solution package.

Is it possible to spell check based on the context that is selected by the end user? The answer is yes. Following are the setup steps:

1. Install and deploy RadEditorMoss solution package.

2. Open up related Page Layout and replace the Rich HTML Field Controls (or text fields) by the RadEditor Control:
  • Register Telerik assembly in Page Layout

    <%@ Register TagPrefix="telerik" Namespace="Telerik.SharePoint.FieldEditor" Assembly="RadEditorSharePoint, Version=5.6.2.0, culture=neutral, PublicKeyToken=1f131a624888eeed" %>

  • Replace the tag of the default editor with the RadeEditor control:

    <telerik:RadHtmlField id="PageContent" FieldName="PageContent" runat="server">telerik:RadHtmlField>

3. (Optional) Download dictionaries from web site http://www.telerik.com/community/forums/aspnet-ajax/spell/147971-radspell-dictionaries.aspx, and save dictionaries with tdf extension to RadEditor dictionary folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\5.6.2.0__1f131a624888eeed\Resources\App_Data\RadSpell).

4. Inside RadEditor global resource folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\5.6.2.0__1f131a624888eeed\Resources), update ToolsFile.XML and add Languages element just before </root> tag (assume that both en-Us.tdf and fr-FR.tdf are installed):
<root>

...
<tools name="MossTools1">
<tool name="AjaxSpellCheck" />
</tools>
...
<languages>
<language code="en-US" title="English"></language>
<language code="fr-FR" title="French"></language>
</languages>
</root>

5. Now you have option to select English or French for spell-check on the toolbar on each RadEditor instance, for example, you want to check English on PageContent text, and check French on PageContentFrench text: