Hi all,
I'm using VB 2005 and need to deploy applications to clients in different
regions. In order to show different language during setup, I need to create
seveal deployment projects and config the value for "localization" (e.g.
English, Chinese, etc.). It works fine except I need to create one for each
language, and also I need to rebuild all of them once there is a new version.
I also have to be careful to deliver the setup file with correct language
interface.
I'm wondering if it is possible to create a single deployment project with
multi-lingual interface, just like some commercial products. When user start
*.msi, the first question is selection of language. Then the setup process
will use the selected language.
Thanks for any idea and advice!
Regards,
James Wong
Jan Hyde (VB MVP) - 05 Jun 2008 16:12 GMT
James Wong <cphk_msdn2@nospam.nospam>'s wild thoughts were
released on Thu, 5 Jun 2008 01:23:06 -0700 bearing the
following fruit:
>Hi all,
>
>I'm using VB 2005
Then you need to be in a 'dotnet' group. This one is a VB6
group.
J
>and need to deploy applications to clients in different
>regions. In order to show different language during setup, I need to create
[quoted text clipped - 13 lines]
>Regards,
>James Wong
--
Jan Hyde
https://mvp.support.microsoft.com/profile/Jan.Hyde
Grant - 06 Jun 2008 00:16 GMT
> I'm wondering if it is possible to create a single deployment project with
> multi-lingual interface, just like some commercial products. When user start
> *.msi, the first question is selection of language. Then the setup process
> will use the selected language.
It is possible to do this using ORCA (Microsofts MSI editor) - but it
is a fairly involved manual process - not something you want to do
everytime you release a new version of a product. For a ready made
solution you might want to take a look at Infralution's
Globalizer.NET. It can translate the resources in an MSI and create
a multilingual msi installer package (as well as translating the rest
of your application). It is much more affordable then purchasing
commercial setup products that allow creation of multilingual
installers. You can get more information and download a trial version
from:
www.infralution.com/globalizer.html
Regards
Grant Frisken
Infralution
Linda Liu[MSFT] - 06 Jun 2008 08:26 GMT
Hi James,
Thank you for posting!
I noticed that you post a same issue in the microsoft.public.vsnet.general
newsgroup. I have replied to that thread and if you have any question about
this particular issue, please reply to that thread and I will follow up
with you in time.
In addition, please post MSI related issues in the
microsoft.public.platformsdk.msi newsgroup in the future and you'll get
help from Microsoft support as well as experienced communities.
For your convenience, I include my reply here:
================================================================
You can use Database Transforms to localize an MSI package.
A transform is a collection of changes applied to an installation. By
applying a transform to a base installation package, the installer can add
or replace data in the installation database. The installer can only apply
transforms during an installation.
There're three types of transforms. Embedded, secured and unsecured
transforms. All of them could be used with the TRANSFORMS parameter in the
msiexec command: msiexec / i xx.msi TRANSFORMS=xx
Suppose we have two MSI packages and one is for English and the other is
for Chinese. We can create a Database transform containing the delta
between Chinese MSI package and English MSI package. Then we could apply
the transform when installing the English MSI package and the UI is in
Chinese.
When we want to upgade the product, we only need to build an MSI package of
higher version based on the previous Setup project for English and then
apply the existing transform while installing the latest MSI package.
The steps to create and apply a transform:
1. Create a Setup project in VS2005 and add the primary output from a
WinForm application.
2. Select the Setup project in Solution Explorer and switch to Properties
window. Select "English(United States)" for the "Localization" item.
3. Build the Setup project. Copy the resulting .msi file to another path,
e.g. d:\ and rename it "SetupEN.msi".
4. Change the "Localization" property to "Chinese(Simplified)" and build
the Setup project. Copy the resulting .msi file to d:\ and rename it
"SetupCN.msi".
5. Modify the package code of the SetupCN.msi to be same as that of the
SetupEN.msi using Orca. Open the SetupCN.msi with Orca and you can see the
package
code of the MSI file from the menu "View | Summary Information".
6. Use the following VB script code to create a transform between
SetupCN.msi and SetupEN.msi:
option explicit
dim wi, basedb, newdb
const msiTransformValidationLanguage = 1
const msiTransformErrorNone = 0
set wi = CreateObject("WindowsInstaller.Installer")
set basedb = wi.opendatabase("SetupEN.msi", 0)
set newdb = wi.opendatabase ("SetupCN.msi", 0)
newdb.GenerateTransform basedb, "thetransform.mst"
newdb.CreateTransformSummaryInfo basedb, "thetransform.mst",
msiTransformErrorNone, msiTransformValidationLanguage
set wi=Nothing
You may paste the above code to Notepad and save it as a .vbs file.
Double-click the .vbs file to run it.
7. Type the following command line to apply the resulting transform while
installing the SetupEN.msi:
msiexec /i SetupEN.msi TRANSFORMS=thetransform.mst
You can create an executable that displays a dialog for the user to select
language and then apply the corresponding transform while installing the
English verison MSI package.
====================================================================
Thank you for using our MSDN Managed Newsgroup Support Service!
Sincerely,
Linda Liu
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.