在标准 Wix 对话框中自定义文本

发布于 2024-08-11 11:11:24 字数 206 浏览 2 评论 0原文

我正在使用 Wix 标准对话框。如何自定义显示的消息文本?

例如,在许可协议页面中,我想将文本“我接受许可协议中的条款”更改为“我承认并接受上述协议的条款”。


相关:
如何在运行时设置要在VerifyReadyDlg中显示的文本?

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 技术交流群。

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

发布评论

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

评论(2

情话已封尘 2024-08-18 11:11:24

我是这样做的:

  1. 将新的本地化文件添加到我的 Votive 项目(即我的 Visual Studio Wix 项目) - 右键单击​​,添加 ->新项目... -> Wix 本地化文件
  2. 由于我正在自定义英文文本,因此我确保文件中的 Culture 属性为 en-US
  3. 为我想要自定义的每个元素添加了字符串元素。例如

    
        我接受上述协议的条款
    

  4. 为了确定我需要覆盖的字符串的 ID,我查看了 WixUI_en-us.wxl 来自 Wix 源代码的文件。在某些情况下,参考源代码会很有帮助各个对话框的,以查找在何处使用了哪些字符串。

  5. 最后要注意的一点是,当您将本地化文件添加到项目中时,Wix 开始在以本地化文件中的区域性命名的子文件夹中输出 msi 文件。例如,我的被写入 \bin\Debug\en-us 而不是 \bin\Debug\

Here's how I did it:

  1. Add a new Localisation file to my Votive project (ie my Visual Studio Wix project) - right-click, Add -> New Item... -> Wix Localisation file
  2. Since I was customising the english text, I made sure the Culture attribute in the file said en-US
  3. Added String elements for each element that I wanted to customise. E.g.

    <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
        <String Id="WelcomeEulaDlgLicenseAcceptedCheckBox">I accept the terms of the above Agreement</String>
    </WixLocalization>

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

  5. Last point to note is that when you add a localisation file to your project, Wix starts outputing the msi files in subfolders named for the culture in the localisation file. E.g. mine were written to \bin\Debug\en-us rather than \bin\Debug\
落日海湾 2024-08-18 11:11:24

高级 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.

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