I'm using a FlowDocument to create a fixed XpsDocument. Skipping all the details, I tried this with both a FlowDocument and a TextBlock on my local machine (Windows 7 Professional, US-English):
<FlowDocument Language="nl" IsHyphenationEnabled="True">...
No hyphenation occurs at all until I remove Language="nl"
, however it then uses the English rules and places hyphens at bad locations. I have also tried to be more specific ("nl-NL") but to no avail.
I suspect that I'd need to upgrade to Windows 7 Ultimate in order to get the Dutch language support, however there is no word mentioned about this in the documentation of FlowDocument.IsHyphenationEnabled or TextBlock.IsHyphenationEnabled.
Can anyone confirm or deny this suspection (authoritative link), or point me to an alternati开发者_运维百科ve way to provide the FlowDocument with a Dutch hyphenation dictionary?
Also, can someone with the Windows 7 Ultimate Edition try this (with the Dutch language pack installed) and confirm if it works (don't want to upgrade just to find out that this was not the problem).
As a sidenote, I have Microsoft Office 2010 on my machine and in Word I get good working hyphenation for the Dutch language. (used to think Office utilized WPF)
Looks like most of my latest questions all turn into 'tumbleweed', but in case anyone else is looking into this, I'll answer my own question.
Additional languages can be added by installing a .Net framework language pack. Unfortunately Dutch is only partially supported (Exception-texts are obfuscated into dutch so your chances of Binging a solution on Google become slim, but useful stuff like hyphenation is not supported).
For now only English, French, German and Spanish are supported.
There is an API to add some jargon words to those dictionaries documented in this blog, but adding a whole new language is not supported. In the comments of that blog the author touches this issue. I'll quote the most relevant phrase:
I agree that the ability to extend spelling support to other languages is a very important feature that many customers want. We would like to provide this functionality, but the feature set that we chose for .Net4.0 did not allow time for us to do this. This is a feature will not be part of .Net4.0, but we are considering for the next release of WPF. (posted 4 December 2009.)
精彩评论