在标准 Wix 对话框中自定义文本 [英] Customizing text in the standard Wix dialogs

查看:28
本文介绍了在标准 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."

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

推荐答案

我是这样做的:

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

  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>

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

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 对话框中自定义文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆