3

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?

H.B.
  • 166,899
  • 29
  • 327
  • 400
Enlightened
  • 239
  • 2
  • 13
  • Did you resolve this issue? I have tried installing the .NET 4.0 Russian language pack and setting the language to ru-RU on the TextBox control and it doesn't seem that spell checking is working. Microsoft don't seem to have much information on this. What did you end up using for Russian spelling checking in WPF? – Luke Jun 16 '11 at 05:06
  • Sorry I didn't realize this was only asked a few hours ago – Luke Jun 16 '11 at 06:28
  • Enlightened, did you end up finding a solution for this? – Luke Jun 21 '11 at 05:01
  • I wrote the checker myself. It uses Nhunspell as a backend. I'll try to do it more interoperable and release it somewhere. – Enlightened Aug 08 '11 at 11:47

3 Answers3

6

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

stuartd
  • 70,509
  • 14
  • 132
  • 163
  • I can't install any language pack for .Net 3.5 SP1 to my Windows 7 :( – Enlightened Jun 15 '11 at 18:09
  • Does anyone have details on how to get the language packs working? – Luke Jun 16 '11 at 05:39
  • 1
    .Net language packs don't seem to do anything to SpellCheck. Other than the Russia language packs for .net 4.0, I can confirm the Portuguese language pack doesn't work either. I suspect this will be the same for every other language pack. There's simply no support for other languages in .Net 4.0. Shame. – Alexandre Bell Jul 14 '11 at 16:53
1

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.

H.B.
  • 166,899
  • 29
  • 327
  • 400
  • I also tried setting the keyboard input language to Russian and that didn't work either. – Luke Jun 16 '11 at 06:27
1

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.

Luke
  • 6,195
  • 11
  • 57
  • 85
  • I've read both of these posts. Now trying to get it working on XP machine. But I'm sure spellchecker is limited only in 4 languages. That's sad. – Enlightened Jun 16 '11 at 06:40
  • 2
    Yes, I have a feeling that the .NET Language packs may not do anything to the spell checking, aside from the English / Spanish / French and German languages. – Luke Jun 16 '11 at 06:57