Does SpellCheck .Net class support russian language?

心已入冬 提交于 2019-12-23 18:22:49

问题


While I'm using such a construction in my code and typing russian text in a textbox nothing happens:

 <TextBox SpellCheck.IsEnabled="True" />

While I'm using this construction english text is spell-checked but not russian

 <TextBox xml:lang="en-US" SpellCheck.IsEnabled="True" />

What I'm doing wrong? How do I check spelling of other languages? Or maybe somebody can advice me a control which checks russian?


回答1:


WPF only supports four languages by default, and none of those are Russian.

However, this page on MSDN Social suggests it is possible by installing .Net Language Packs




回答2:


I have tried researching this topic further and come across the following posts, http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/06a2cc61-f2ae-4534-b35a-6c676bc2bcb2/?prof=required and the Community Wiki at http://msdn.microsoft.com/en-us/library/system.windows.controls.spellcheck(v=VS.100).aspx

They do state that the language packs for .NET 3.5 and .NET 4.0 should add additional languages, however I have tried setting the TextBox control to Language="ru-RU" with SpellCheck.IsEnable="True". I installed the .NET 4.0 Russian language pack on my Windows Vista machine (English system install). The Spell Checking still does not work. I wish Microsoft were clearer on how to get a different language pack working with the spell checking.




回答3:


en-US specifies that it should check American English, you probably need to set it to ru-RU and the respective language pack needs to be installed.

Edit: From the SpellCheck class:

Spelling checker is supported only when WPF provides a default dictionary. In .NET Framework 4, WPF provides dictionaries for English, French, German, and Spanish.

I thought it would work for any language pack but it might be that the source where i read about that was referring to the language packs of those four languages.



来源:https://stackoverflow.com/questions/6361219/does-spellcheck-net-class-support-russian-language

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!