IsHyphenationEnabled 是否取决于操作系统语言? (WPF FlowDocument 和 TextBlock)

发布于 2024-12-07 23:32:01 字数 984 浏览 0 评论 0原文

我正在使用 FlowDocument 创建固定的 XpsDocument。跳过所有细节,我在本地计算机(Windows 7 Professional、美国英语)上尝试使用 FlowDocument 和 TextBlock 进行此操作:

<FlowDocument Language="nl" IsHyphenationEnabled="True">...

在删除 Language="nl" 之前,根本不会出现连字符,然而,它随后使用英语规则并将连字符放在错误的位置。我也尝试更具体(“nl-NL”)但无济于事。

我怀疑我需要升级到 Windows 7 Ultimate 才能获得荷兰语支持,但是 FlowDocument.IsHyphenationEnabledTextBlock.IsHyphenationEnabled。

任何人都可以确认或否认这种怀疑(权威链接),或者指出我提供带有荷兰语连字符字典的 FlowDocument 的替代方法吗?

另外,使用 Windows 7 Ultimate Edition 的人可以尝试一下这个(安装了荷兰语语言包)并确认它是否有效(不想升级只是为了发现这不是问题)。


顺便说一句,我的机器上安装了 Microsoft Office 2010,在 Word 中,我可以很好地使用荷兰语连字符。 (曾经以为Office使用了WPF)

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 alternative 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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深空失忆 2024-12-14 23:32:01

看起来我最新的大多数问题都变成了“风滚草”,但如果其他人正在研究这个,我会回答我自己的问题。

可以通过安装 .Net Framework 语言包来添加其他语言。不幸的是,仅部分支持荷兰语(异常文本被混淆为荷兰语,因此您在 Google 上搜索解决方案的机会变得很小,但不支持连字符等有用的内容)。

目前仅支持英语、法语、德语和西班牙语。

有一个 API 可以将一些行话添加到 此博客,但不支持添加全新语言。在该博客的评论中,作者谈到了这个问题。我将引用最相关的短语:

我同意将拼写支持扩展到其他语言的能力是许多客户想要的一个非常重要的功能。我们希望提供此功能,但我们为 .Net4.0 选择的功能集不允许我们有时间这样做。此功能不会成为 .Net4.0 的一部分,但我们正在考虑将其用于下一个版本的 WPF。 (发布于 2009 年 12 月 4 日。)

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.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文