简体   繁体   English

是否可以使用WIX创建多语言安装程序?

[英]is it possible to create a multilanguage installer using WIX?

是否可以使用WIX创建多语言安装程序?

You can do this without bootstrapper, if you create embedded transformations, and MSI installer will automatically apply one of them, according to your system locale. 如果您创建嵌入式转换,则无需引导程序即可执行此操作,并且MSI安装程序会根据您的系统区域设置自动应用其中之一。

For complete details & scripts, please, follow this link: 有关完整的详细信息和脚本,请点击以下链接:

http://www.geektieguy.com/2010/03/13/create-a-multi-lingual-multi-language-msi-using-wix-and-custom-build-scripts/ http://www.geektieguy.com/2010/03/13/create-a-multi-lingual-multi-language-msi-using-wix-and-custom-build-scripts/

They say, it is undocumented feature of Microsoft Installer, so please, be careful using it. 他们说,这是Microsoft Installer的未记录功能,因此请小心使用它。

It may not be impossible, but it is likely very, very difficult to author an MSI with Wix where the UI language is determined at runtime. 可能并非不可能,但是用Wix编写MSI可能非常非常困难,因为其中的UI语言是在运行时确定的。 Wix is all about build-time localization, ie you can easily create different MSIs, each with its own UI language, from the same source files. Wix与构建时本地化有关,也就是说,您可以从相同的源文件中轻松创建不同的MSI,每个MSI都有自己的UI语言。

Apparently there is a solution to your problem using WIX. 显然,使用WIX可以解决您的问题。 What you need to do is to create a bootstrap loader. 您需要做的是创建一个引导加载程序。 There is a tool called Setupbld.exe that helps with that. 有一个名为Setupbld.exe的工具可以帮助您解决此问题。 You can read more on John Robbins' Blog . 您可以在John Robbins的Blog上阅读更多内容。

Absolutely. 绝对。 First, your .msi must have all the transforms from foreign-language MSIs embedded into it (see Embedded Transforms ). 首先,您的.msi必须将来自外语MSI的所有转换都嵌入其中(请参见Embedded Transforms )。 This can be done with Microsoft's MsiTran.exe and WiSubStg.vbs , mentioned in the GeekTieGuy link elsewhere in this post. 可以使用Microsoft的MsiTran.exe和WiSubStg.vbs来完成此操作,该文章其他地方的GeekTieGuy链接中提到。

Second, your .wxs file's Package element must contain a Languages attribute with a comma-delimited list of all your supported locale IDs, eg 其次,您的.wxs文件的Package元素必须包含Languages属性,并以逗号分隔所有支持的语言环境ID的列表,例如

Languages="1033,1031,3082,1036,1040,1041,1042,1043,1046,1049,2052,1028"

Now you can double-click the .msi on a foreign language system and have it automatically come up in the correct language 现在,您可以在外语系统上双击.msi,并自动以正确的语言显示它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM