自定义 CancelDlgIcon 以显示警告符号
我需要在 wix 中显示 CancelDlg 的警告图像而不是信息图像。我可以通过添加以下代码来做到这一点:
<String Id="CancelDlgIcon" Overridable="yes" Localizable="yes">WixUI_Ico_Exclam<String>
但是我有针对不同语言的构建,例如 fr-fr、ja-jp、en-us 等。
仅对于 en-us 它工作正常。对于其他语言,不会显示警告图标:(
任何人都可以帮助我并让我知道要进行哪些更改才能适用于所有语言(es-es、en-us、fr-fr、ja-jp 等)?
I need to show warning image instead of information image for CancelDlg in wix. I was able to do that by adding the following code:
<String Id="CancelDlgIcon" Overridable="yes" Localizable="yes">WixUI_Ico_Exclam<String>
However I have builds for different languages for e.g. fr-fr, ja-jp, en-us, etc.
Only for en-us it is working fine. For other languages the warning icon is not displayed :(
Can anyone please help me and let me know what changes to make so that it works for all languages (es-es, en-us, fr-fr, ja-jp etc)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该为每个
*.wxl
文件中的每个可本地化字符串创建一个
元素,并提供适当的元素值 (WixUI_Ico_Exclam
在你的情况下)。此外,您可以为不同的语言使用不同的图像,但这看起来很奇怪。或者(恕我直言,这个选项更适合这种情况)您可以依赖文化组,这基本上是翻译的后备机制。您可以指定要构建到单个 MSI 包中的多个
*.wxl
文件,如果在第一个文件中找不到该短语,它将尝试在第二个文件中找到它,等等。因此,对于像WixUI_Ico_Exclam
这样的“逻辑上不可翻译”的标记,您可以将其放入en.wxl
中,并提供en
作为后备文化light.exe
。有关更多详细信息,请参阅
WiX.chm
中的“指定要构建的区域性”主题。You should author a
<String/>
element per each localizable string in each*.wxl
file and provide the appropriate element value (WixUI_Ico_Exclam
in your case). Moreover, you can have different images for different languages, but that would look strange.Alternatively (and this option is better for this case, IMHO) you can rely on culture groups, which is basically a fallback mechanism for translations. You can specify several
*.wxl
files to be built into a single MSI package, and in case the phrase is not found in the first file on the line, it will try to find it in the second, and so on. So, for "logically untranslatable" tokens likeWixUI_Ico_Exclam
you can have it once in theen.wxl
, and provideen
as a fallback culture tolight.exe
.See "Specifying Cultures to Build" topic in
WiX.chm
for more details.