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

Setting spell checker language

3 Answers 118 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Axelle
Top achievements
Rank 1
Axelle asked on 07 May 2014, 10:13 AM
Hi, 

This forum post http://www.telerik.com/forums/147971-radspell-dictionaries states that spell contains dictionnary for french by default. I however cannot find a code snippet to force the spellchecking of a radrichtextbox language to french (I don't want it to change depending on the computer locale). 

I tried that : 
richTextBox.SpellChecker.SpellCheckingCulture = new CultureInfo("fr-FR");

but that doesn't seem to work.

Could you please provide me with a snippet ? 

Thanks,

3 Answers, 1 is accepted

Sort by
0
Accepted
Missing User
answered on 10 May 2014, 08:43 AM
Hi Axelle,

Thank you for your interest in RadRichTextBox!

RadRichTextBox for Silverlight comes with a default English spellchecking dictionary. Of course, customization is possible and you can read more about that at this help article. The mentioned forum post is about RadSpell control which is a part of Telerik UI for ASP.NET AJAX, but its dictionaries are interoperable with RadRichTextBox’s ones. 

Please find attached a demo project which illustrates how to add a French dictionary and enable spellchecking for text in this language. RadDictionary class supports the loading of a dictionaries directly from a *.tdf files.

Additionally, you need to make sure the CurrentCulture is set. The attached project shows two ways of doing that: 

 - First option is related to setting the culture of the CurrentThread as in the code-snippet below:
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

 - Second option, you could set the SpellCheckingCulture like this:
((DocumentSpellChecker)this.radRichTextBox.SpellChecker).SpellCheckingCulture = new CultureInfo("fr-FR");

I hope this helps!
Let me know if you have other comments or questions. I would be glad to provide any assistance!

Regards,
Yancho
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.
 
0
Axelle
Top achievements
Rank 1
answered on 30 May 2014, 02:32 PM
Thanks a lot, that works great. 

Is there any way to also localize the context menu ? 
0
Accepted
Petya
Telerik team
answered on 03 Jun 2014, 12:08 PM
Hello Axelle,

You can localize all string in RadRichTextBox, including the context menu using one of the localization mechanisms explained here. Please also check this SDK example where you can find a resource file containing all resources used in RadRichTextBox and its predefined UI.

I hope this is helpful.

Regards,
Petya
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
Axelle
Top achievements
Rank 1
Answers by
Missing User
Axelle
Top achievements
Rank 1
Petya
Telerik team
Share this question
or