6 Answers, 1 is accepted
You can switch between languages in runtime by just setting the SpellCheckingCulture property of DocumentSpellChecker for the corresponding control. I have attached a demo showing you a simple example.
If you have other concerns do not hesitate to get back to us.
Andrew
the Telerik team
One of the telerik help site says that "ESDictionary class is located in another assembly and inherits RadDictionary"
http://www.telerik.com/help/silverlight/radspellchecker-multilanguage-support.html
Is it necessary that the custom dictionary class has to be in a separate assembly. Cant i have multiple dictionaries in the same assembly ? Even in your attached sample, you have two dictionaries, you have created two separate dictionaries in separate assemblies. Is that really required.
For me, i need to have 10 different cultures, so do i need to create 10 separate projects ?
The sample application that you have attached indeed has the dictionaries...and we could see that the SpellCheckingCulture is also being set from code-behind (before firing the Check method).
But, whatever culture we specify, the suggestions provided by the spell checker for the same word are same in different culture also.
Where exactly can i figure out that the suggestions are different as per the culture specified.
Also, please let me know if there is a way to localize the SpellCheck buttons (Ignore All, Change, Add to dictionary, etc...) based on the current culture.
This is possible in asp.net version of the spellcheck control.
It is not necessary to create a different project for each dictionary. We have thought it would be convenient to keep them in separate projects, so that when the whole solution is built, different assemblies containing each dictionary will be prepared. Especially considering that some dictionaries can be quite big in size (for example, the Russian one is 13MB) and you might need different dictionaries in several unrelated applications. If you prefer, you can have all tdf files and the respective dictionary classes in one project.
As for the demo, it was prepared for a previous version of the controls. In the latest version we added an optimization for the use of MEF, so that only the assemblies that the control needs are loaded by default. In order to have MEF load all assemblies, including the assemblies with the Russian and German dictionaries from the example, you have to add the following line in the App.xaml.cs in the handler of the StartUp event:
private
void
Application_Startup(
object
sender, StartupEventArgs e)
{
RadCompositionInitializer.Container =
new
CompositionContainer(
new
SafeXapCatalog());
this
.RootVisual =
new
MainPage();
}
When it comes to localization, it is supported and you can refer to this forum thread for the localization strings in question. All the best,
Iva
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I was worried when same suggestions were appearing for different culture. But after adding the extra line in the App.xaml.cs, it is working fine.
You were talking about some optimization for the use of MEF. Can you please explain in which version has that been implemented.
Because without that extra line of code in the App.Xaml.cs, the attached sample does not provide correct suggestion (based on the selected Culture).
The change was made just after the Q1 SP1 (2011.1.419). So the project works correctly with the Q1 and Q1 SP1 version of the controls, but with Q2 (2011.2.712) and the internal builds after that, you need to add the line from the code-snippet before the InitializeComponent of the MainPage is invoked.
Greetings,Iva
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>