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

RadSpellChecker multi language

9 Answers 125 Views
SpellChecker
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 10 Apr 2012, 07:18 PM
There are plenty of demos how to set a different language for a spell checker using ControlSpellCheckersManager.

But i do not see a way to do this with the RadSpellChecker class
RadSpellChecker.WindowSettings.Theme = StyleManager.ApplicationTheme;
RadSpellChecker.WindowSettings.StartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterOwner;
RadSpellChecker.Check(txt, SpellCheckingMode.AllAtOnce);                     

How do define in the above code that a different dictionary must be used? It doesn't seem to be possible.

Also... what are the resource keys for the buttons on this window so i can translate the window to dutch?

Best Regards,

Peter

9 Answers, 1 is accepted

Sort by
0
Andrew
Telerik team
answered on 12 Apr 2012, 12:28 PM
Hi Peter,

As you can see here RadSpellChecker internally uses ConstrolSpellCheckersManager. As described in this help article you can get a ControlSpellChecker for a control, say a TextBox, and set its spellchecking culture to whatever you want (first you need to add a dictionary for that culture to the ControlsSpellChecker). That way the preferred culture will be used when spellchecking.

NOTE: The SpellCheckAllAtOnce dialog always uses RadRichTextBoxControlsSpellchecker no matter what control you are spellchecking.

The localization strings for SpellCheckAllAtOnceWindow are as follow:

Documents_SpellCheckingDialog_Header 
Documents_SpellCheckingDialog_NotInDictionary 
Documents_SpellCheckingDialog_IgnoreAll 
Documents_SpellCheckingDialog_AddToDictionary 
Documents_SpellCheckingDialog_ChangeTo 
Documents_SpellCheckingDialog_Change 
Documents_SpellCheckingDialog_Suggestions 
Documents_SpellCheckingDialog_EditCustomDictionary 
Ok 
Cancel 
All the best,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
HDC
Top achievements
Rank 1
answered on 12 Apr 2012, 12:36 PM
Hi Andrew,

I can't seem to be able to put two and two together here. I just don't see the connection between ConstrolSpellCheckersManager and RadSpellChecker.

I know how to set ConstrolSpellCheckersManager to a diferent dictionary, but RadSpellChecker will still use the default dictionary.

Can you give me some sample code of how i would go about setting dutch as a dictionary for RadSpellChecker so i can use that on a plain textbox.

Best Regards,

Peter

0
Accepted
Andrew
Telerik team
answered on 12 Apr 2012, 01:27 PM
Hello Peter,

I have created a sample project that illustrates the approach described in the previous post. It adds the nl-NL dictionary manually to the appropriate SpellChecker. Please revise the attached solution.

There is another approach, too - you can create different assemblies for different  languages you want to support (as the one included in our Control Suite).Then all dictionaries are loaded through MEF. The second project attached illustrates this approach.

I hope this helps.

All the best,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
HDC
Top achievements
Rank 1
answered on 12 Apr 2012, 02:06 PM
Hi Andrew,

Thanks for the samples, i understand now how it works.

Best Regards,

Peter
0
HDC
Top achievements
Rank 1
answered on 12 Apr 2012, 08:50 PM
Hi Andrew,

Sorry to bother you again about this, but you seem to have forgotten the key for the message that pops up when spelling is complete. I got from another support ticket that it should be

Documents_SpellCheckingDialog_SpellingCheckIsComplete

But this key doesn't seem to work anymore. Has it been changed, if so, what are the new key(s)?

Btw... it may help if a localization page was added to the documentation of RadSpellChecker, because the keys for "Edit Custom
 Dictionary" dialog are also not mentioned.

Best Regards,

Peter

0
Andrew
Telerik team
answered on 17 Apr 2012, 11:44 AM
Hello Peter,

I am very sorry for missing those strings. Here they are:

SpellChecking completed alert dialog:

SpellChecker_SpellingCheckIsCompleteMessageHeader 
SpellChecker_SpellingCheckIsCompleteMessage 

 Edit Custom Dictionary dialog:
Documents_EditCustomDictionaryDialog_Header 
Documents_EditCustomDictionaryDialog_Word 
Documents_EditCustomDictionaryDialog_Dictionary 
Documents_EditCustomDictionaryDialog_Add 
Documents_EditCustomDictionaryDialog_Delete 
Documents_EditCustomDictionaryDialog_DeleteAll 
Close 

We will make sure to add this to the documentation of the control.

Please get back to us if you encounter any other problems. Greetings,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
HDC
Top achievements
Rank 1
answered on 17 Apr 2012, 06:29 PM
Hi Andrew,

That solves the problem, all buttons and screens are now localized.

Thanks for the assistance.

Best Regards,

Peter
0
jdpapiero
Top achievements
Rank 1
answered on 24 Jan 2013, 05:43 PM
Hi Andrew,

I reviewed your examples and the silverlight application it's ok, but when I change the idiom for es-ES.tdf that corresponding to spanish, I have a error that say, Instance reference to object not established.

My question is, it's wrong the tdf file that I downloaded from telerik site? or how I resolve this problem?

<<I think that file is correct because found ok only when renamed and replaced the File to nl-NL <- same that example. But When I add to the project, this file es-ES.tdf the error appear. Exist any restriction with routes, namespaces, etc?>>

Please help.

Thanks
0
Petya
Telerik team
answered on 28 Jan 2013, 03:28 PM
Hello jdpapiero,

Can you please make sure that the .tdf file in your project has its Build Action set to Resource?

I added a Spanish dictionary to one of Andrew's projects and it seems to work as expected on my end. You can find the project attached for reference.

I hope this solves the problem! Do not hesitate to get back to us if you have other comments or questions.

Kind regards,
Petya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
SpellChecker
Asked by
HDC
Top achievements
Rank 1
Answers by
Andrew
Telerik team
HDC
Top achievements
Rank 1
jdpapiero
Top achievements
Rank 1
Petya
Telerik team
Share this question
or