在标准 Wix 对话框中自定义文本
我正在使用 Wix 标准对话框。如何自定义显示的消息文本?
例如,在许可协议页面中,我想将文本“我接受许可协议中的条款”更改为“我承认并接受上述协议的条款”。
I'm making use of the Wix standard dialogs. How do I customise the text of the messages displayed?
For example, in the License Agreement page, I want to change the text "I accept the terms in the License Agreement" to "I acknowledge and accept the terms of the above agreement."
Related:
How can I set at runtime the text to be displayed in VerifyReadyDlg ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我是这样做的:
为我想要自定义的每个元素添加了字符串元素。例如
为了确定我需要覆盖的字符串的 ID,我查看了 WixUI_en-us.wxl 来自 Wix 源代码的文件。在某些情况下,参考源代码会很有帮助各个对话框的,以查找在何处使用了哪些字符串。
Here's how I did it:
Added String elements for each element that I wanted to customise. E.g.
To determine the Ids of the strings I needed to override, I looked in the WixUI_en-us.wxl file from the Wix source code. In some cases it was helpful to refer to the source code of the individual dialogs to find which strings were used where.
高级 WiX 主题 -> 章节Wix UI 对话框库 -> WiX 文档 (wix.chm) 中的自定义内置 WixUI 对话框集包含有关自定义 UI 对话框的所有信息,包括文本。 WiX 教程中还有一个关于自定义 UI 的主题,网址为 http://www.tramontana.co.hu /wix/ 。
如果您确实发现需要覆盖 WiX 的更多默认行为,最好的开始方法是下载源代码(例如来自 http://wix.sourceforge.net/releases/3.5.1030.0/wix35-sources.zip ):所有 UI 对话框都位于 src\ext\UIExtension\wixlib 中,并将让您深入了解它的工作原理。
The chapter Advanced WiX Topics -> Wix UI Dialog Library -> Customizing Built-in WixUI Dialog Sets in the WiX documentation (wix.chm) has all the information on customising the UI dialogs, including the text. There's also a topic on customising the UI in the WiX tutorial at http://www.tramontana.co.hu/wix/ .
If you do find you need to override more of WiX's default behaviour, the best way to start is to download the sources ( e.g. from http://wix.sourceforge.net/releases/3.5.1030.0/wix35-sources.zip ): all the UI dialogs are in src\ext\UIExtension\wixlib, and will give you an insight into how it works.