Multilingual spellcheck on WPF richtextbox
Posted
by sub-jp
on Stack Overflow
See other posts from Stack Overflow
or by sub-jp
Published on 2010-04-16T17:05:00Z
Indexed on
2010/04/16
18:03 UTC
Read the original article
Hit count: 580
I need to turn spellcheck on for a richtextbox, and set the language to one the user has picked from a drop down. For now, I'm just testing it by building the richtextbox in xaml and providing a language to the xaml language attribute.
I've read two different resources and one says I need to set the language attribute, and the other says I need to set the xml:lang attribute. Neither seems to work. I've tried setting either one to "es" for Spanish, and I've also tried setting both to "es". I've also tried french by setting them to "fr-FR", without success. The only thing that happens is that english words aren't marked, but the other language words are marked as misspelled.
I also read that I need to change the keyboard language. This would be a problem for my application as the language within the application needs to be switched on the fly, so having the end user go to their keyboard settings just so spellcheck will work is a problem. However, I've changed my keyboard settings, and spell check still does not work properly. This time it doesn't mark anything as misspelled, even misspelled english words.
What am I missing?
Edit: some links to my references above http://msdn.microsoft.com/en-us/library/system.windows.controls.spellcheck(v=VS.100).aspx
http://www.dev102.com/2008/03/25/customize-spellcheck-on-wpf-text-controls/
© Stack Overflow or respective owner