WPF spell check languages

前端 未结 3 613
余生分开走
余生分开走 2020-12-18 10:29

I\'m trying to enable spell checking on a RichTextBox in a small WPF application. Most of the documents for the application are in danish. I would prefer to use natively WPF

相关标签:
3条回答
  • 2020-12-18 10:54

    I've looked around and I think that they still only support 4 languages for spell check.

    here is a similar post: Does WPF's TextBox support spell-check dictionaries for the Netherlands?

    EDIT: here is a quote from one link:

    Spelling support in WPF is limited to four languages: English, Spanish, French, and German. Custom dictionaries are designed to augment the default dictionaries for these languages and not to extend spelling support to other languages.

    Source: http://blogs.msdn.com/b/text/archive/2009/10/02/custom-dictionaries.aspx

    0 讨论(0)
  • 2020-12-18 11:05

    Spellchecking works already with all languages supported by Windows. You need to download full Windows language pack (Windows translation) for desired language. In Windows' lower than 10 .NET 4.6.1 with language packs may be required.

    0 讨论(0)
  • 2020-12-18 11:09

    Please see this blog post from the WPF team that elaborates a bit more.

    In configurations where only 4 languages are supported, you just need to set xml:lang correctly - I don't believe that you need to installe any additional lang-packs.

    On platforms that support additional languages, the OS needs the underlying platform support to be enabled first. This support can be enabled by installing the corresponding Feature On Demand package (FoD) package.

    The KB article linked above doesn't elaborate on precisely how to install the right FoD package. You can do this in one of the two ways -

    • Add the corresponding keyboard.
      • In Win10, go to Settings -> Time & Language -> Region & Language -> Add a Language. By default, this will add keyboard support for the language in question (this does not add language packs by default). The OS will notify Windows Update to download and install the corresponding FoD package automatically (you'll see a notification indicating that new features are being installed). Once this is done, WPF will start supporting spell checking for the language you just enabled.
    • You can also enable it using DISM by following the instructions here. The packages to look for are the 'Basic' ones. This can be done in 'online' mode (i.e., in an up-and-running OS), or during OS image creation offline (usually done for repeatable deployments).
    0 讨论(0)
提交回复
热议问题