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

[Solved] Multilanguage support for spell checker in RadEditor

2 Answers 323 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Joseph Alfano
Top achievements
Rank 1
Joseph Alfano asked on 07 Jul 2009, 08:26 PM
Hi,

We are using the RadEditor on a web site where content can be entered in a variety of languages.  We downloaded the various dictionaries from your web site and placed them in the App_Data directory. 

Since we are going to have many instances of the RadEditor control throughout the site, we would like to set up as much configuration as possible in the ToolsFiles.xml file, to have a single place where changes can be made.  We are defining the tool buttons here, as well as the languages.  Below is the languages portion of the file:

  <languages> 
    <language code="ar-AR" title="Arabic" /> 
    <language code="af-ZA" title="Afrikaans (South Africa)" /> 
    <language code="bg-BG" title="Bulgarian (Bulgaria)" /> 
    <language code="cs-CZ" title="Czech (Czech Republic)" /> 
    <language code="da-DK" title="Danish (Denmark)" /> 
    <language code="nl-NL" title="Dutch (Netherlands)" /> 
    <language code="en-US" title="English (United States)" /> 
    <language code="en-AU" title="English (Australia)" /> 
    <language code="en-GB" title="English (United Kingdom)" /> 
    <language code="en-CA" title="English (Canada)" /> 
    <language code="fr-FR" title="French (France)" /> 
    <language code="fr-CA" title="French (Canada)" /> 
    <language code="de-DE" title="German (Germany)" /> 
    <language code="de-CH" title="German (Switzerland)" /> 
    <language code="it-IT" title="Italian (Italy)" /> 
    <language code="he-IL" title="Hebrew (Israel)‎" /> 
    <language code="hu-HU" title="Hungarian (Hungary)" /> 
    <language code="nb-NO" title="Norwegian, BokmÃ¥l (Norway)" /> 
    <language code="nn-NO" title="Norwegian, Nynorsk (Norway)" /> 
    <language code="pl-PL" title="Polish (Poland)" /> 
    <language code="pt-BR" title="Portuguese (Brazil)" /> 
    <language code="pt-PT" title="Portuguese (Portugal)" /> 
    <language code="ro-RO" title="Romanian (Romania)" /> 
    <language code="ru-RU" title="Russian (Russia)" /> 
    <language code="sk-SK" title="Slovak (Slovakia)" /> 
    <language code="es-ES" title="Spanish (Spain)" /> 
    <language code="sv-SE" title="Swedish (Sweden)" /> 
    <language code="sl-SI" title="Slovenian (Slovenia)" /> 
    <language code="th-TH" title="Thai (Thailand)" /> 
    <language code="uk-UA" title="Ukrainian (Ukraine)" /> 
  </languages> 

These language entries are successfully getting picked up, and I can see the list of languages displayed in the AjaxSpellCheck push-button drop-down list. The spellchecking functionality for most of the languages works fine.  However, whenever I try to spellcheck with a language that does not support phonetic spellchecking (such as Russian or Arabic) I get an exception saying "This language is incompatible with the phonetic spell check provider"

In the RadEditor control, I can specify which SpellCheckProvider to use via the SpellCheckSettings node.  For example:

<SpellCheckSettings SpellCheckProvider="EditDistanceProvider" /> 

However, it is my understanding that this is a global setting that applies to all languages used in the spell checker in the RadEditor.  The problem is, for some languages you need to use the PhoneticProvider, and for others you need to use the EditDistanceProvider.

What would be the best way to specify which languages use which SpellCheckProviders? Is there any way to specify in the ToolsFile which languages use the PhoneticProvider and which use the EditDistanceProvider?  It looks like in the <language> node in the ToolsFile, only the code and title attributes are supported.

Thanks so much for the help!

Joe

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Jul 2009, 01:29 PM
Hi Joseph,

All dictionaries are supported by the EditDistance spellcheck provider and my suggestion is to set the SpellCheckSettings-SpellCheckProvider property to EditDistanceProvider, e.g.

<telerik:RadEditor runat="server" SpellCheckSettings-SpellCheckProvider="EditDistanceProvider" ...

This should fix the problem.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joseph Alfano
Top achievements
Rank 1
answered on 13 Jul 2009, 02:48 PM
Hi Rumen,

Great, thanks for the help!  I specified the  SpellCheckSettings-SpellCheckProvider="EditDistanceProvider" SpellCheckSettings-EditDistance="1", and now all languages are working great.

Thanks again.

Joe
Tags
Editor
Asked by
Joseph Alfano
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Joseph Alfano
Top achievements
Rank 1
Share this question
or