问题描述
当为 WiX MSI 项目使用 WixIIsExtension 来构建本地化安装程序(例如 ru-RU 文化)时,我遇到了很多这样的错误:
When using the WixIIsExtension for WiX MSI project, for building localized installer (ru-RU culture, for example), I got a lot of such errors:
- 本地化变量 (loc.configureiis) 未知.请确保变量已定义
我有解决方法 - 安装 IIS 应用程序被组织为没有本地化的单独合并模块.当我使用 WixIIsExtension 构建 WiX MergeModule 项目时 - 没问题.
I have the workaround for it - installing IIS application is organized as separate merge module without localizations. When I build WiX MergeModule project with using WixIIsExtension - it's OK.
但是MSI项目内部出错的原因是什么?它会在 WiX 的后续版本中修复吗?
But what is the reason of errors inside MSI project? Would it be fixed in later versions of WiX?
推荐答案
IIS 扩展消息未本地化为俄语.您可以只指定后备"文化,以便使用现有(英语)消息.在项目设置中,在Cultures to build"中设置ru-RU,en-US",而不仅仅是ru-RU".
The IIS extension messages are not localized into russian. You can just specify a "fallback" culture, so that existing (English) messages are used. In the project settings, set "ru-RU,en-US" in the "Cultures to build", instead of just "ru-RU".
查看有关后备文化的更多信息:http://wixtoolset.org/文档/手册/v3/howtos/ui_and_localization/specifying_cultures_to_build.html
See more about fallback cultures: http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/specifying_cultures_to_build.html
这些 iis 扩展的非本地化字符串在进度条运行时和日志文件中仅显示几分之一秒.
These non-localized strings of the iis extension are just shown for a fraction of a second when progress bar runs, and in the log files.
无论如何,您也可以自己提供翻译(或等到提供后:)要自己翻译,您可以下载 wix 源代码(wix39-debug.zip),然后复制名为 wix39- 的文件debug\src\ext\IIsExtension\wixlib\en-us.wxl
到你的项目中(如ru-RU.wxl),包含在项目中,然后翻译英文字符串.
Anyways, you could also provide the translations yourself (or wait until they are provided :) To translate yourself, you could download the wix source code (wix39-debug.zip), then copy the file named wix39-debug\src\ext\IIsExtension\wixlib\en-us.wxl
into your project (as ru-RU.wxl), include it in project, and then translate English strings.
这篇关于在构建本地化安装程序时使用 WixIIsExtension 和本地化变量错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!