Setting spell checker language

4 posts, 2 answers
  1. Axelle
    Axelle avatar
    13 posts
    Member since:
    Mar 2014

    Posted 07 May 2014 Link to this post

    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,
  2. Answer
    Yancho
    Admin
    Yancho avatar
    72 posts

    Posted 10 May 2014 Link to this post

    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.
     
  3. DevCraft banner
  4. Axelle
    Axelle avatar
    13 posts
    Member since:
    Mar 2014

    Posted 30 May 2014 in reply to Yancho Link to this post

    Thanks a lot, that works great. 

    Is there any way to also localize the context menu ? 
  5. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 03 Jun 2014 Link to this post

    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.
     
Back to Top