Lester's WPF\SL Blog

Simple, Easy & Beautiful

Multi-language speller and the SpellingReform

Multi-language speller and the SpellingReform

  • Comments 10

SpellCheck is an interesting feature in Editing and it has evolved quite a bit. In earlier versions, the spellcheck on the RichTextBox and Textbox would look at the lang property on the control. However, now in the case of RichTextBox the input language is determined and the appropriate speller is used. So for instance I type in "dogf" in English and then type the same with the Keyboard input being German, then for both the words the choices are diferent because 2 different spellers are at work. Thats a very nice enhancement when you compare it with MS Word which can have only one speller working at a time :)

When it comes to TextBox, the speller is based on the input language set on the control. In earlier versions this defaulted to English but now we default it to the input language. So if the Keyboard input language is German and the textbox is created, then the German speller would work. However, if we change the input language once the control is created the control's language property does not change and so the speller remains intact.

An interesting feature on SpellCheck is the SpellingReform property. This can have 3 values corresponding to SpellCheck.SpellingReform = PreReform/PostReform/PreAndPostRefirm. This setting is not aplicable to English but is useful for the French and German languages which use these settings.

An example of this is the word: règlemente in French settings. This word is shown as a spelling error with PreReform but is not an error in PostReform.

  • Isn't it quite brave to have fixed enums for the various stages of reform of the German spelling? They had various stages of the reform, took back a number of things, now they are talking about the reform of the reform. I don't know the details, but everything seems to be very much in flux. Using an enum in such a case seems strange.
  • To my knowledge, Word seems to be doing the same thing and the speller in WPF is following the behavior displayed by Word.
  • I'm not quite sure I understand how that works, but just so long as it continues to work properly for non-US varieties of English, because that's one feature I've really appreciated (and the speller wouldn't have been useful without it).
  • Thanks for this post, Lester,

    Just in case anyone is curious about the French spelling reform, I posted something about this on our blog a few months ago, just after we released the new French speller which supports it with three different options for Office 2003 users: http://blogs.msdn.com/correcteurorthographiqueoffice/archive/2005/10/16/481531.aspx

    I hope it can be helpful,

    Thierry

    Thierry Fontenelle (MSFT) - Program Manager
  • That link is much appreciated Thierry - I've been wondering where to find information on the new conventions.

    After years (school and university) learning the old rules, I have to admit the new stuff looks very strange (my brain keeps trying to tell me that those graves should be acutes and so on). But everything looks familiar once you've seen enough of it.
  • In our case we want to have keyboard input as Danish but we want to write (and spell check) English. Witch is a common scenario in Denmark.
    How can we accomplish that?

    BTW, there seems to be no Danish dictionary. How can we add that?

    BR
  • In our case we want to have keyboard input is Danish but we want to write (and spell check) English. Witch is a common scenario in Denmark.
    How can we accomplish that?

    BTW, there seems to be no Danish dictionary. How can we add that?

  • (Ups, sorry for the double post)
  • there is no danish dictionary so adding it is not an option. Coming to spell checking english as long as the lang tag is english the english speller would work.
  • Yes, that works.
    It is however not very usefull, as new text I write will have the danish again.

    Is there anyway disable this "feature"?

    BR
Page 1 of 1 (10 items)