是否可以将变量传递给 WIX 本地化文件? [英] Is it possible to pass variable to WIX localization file?
问题描述
我需要在 WIX 本地化文件 WIXUI_en-us.wxl 中使用变量.我试过这样使用它:
I need to use variable in WIX localization file WIXUI_en-us.wxl. I tried use it like this:
<String Id="Message_SomeVersionAlreadyInstalled" Overridable="yes">A another version of product $(var.InstallationVersionForGUI) is already installed</String>
但它不起作用.当我声明财产并以这种方式使用它时:
But it doesn't work. And when I declared property and used it this way:
<String Id="Message_SomeVersionAlreadyInstalled" Overridable="yes">已经安装了另一个版本的产品 [InstallationVersionForGUI]</String
>
也不行.
我哪里错了?
感谢您的帮助和您的时间.
Thanks for help and your time.
推荐答案
本地化字符串是在链接时处理的,所以你不能使用 $(var) 预处理器变量.支持使用 [property] 引用,只要使用本地化字符串的位置支持运行时格式(例如,使用 Formatted 字段类型).
Localization strings are processed at link time, so you can't use $(var) preprocessor variables. Using a [property] reference is supported, as long as the place where the localization string is used supports run-time formatting (e.g., using the Formatted field type).
这篇关于是否可以将变量传递给 WIX 本地化文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!