Mailbag: How can I create a multilingual MSI-based setup?

Question:

I am building an MSI-based setup for my application.  I would like the setup to contain UI strings in multiple languages, and then have setup detect the user's OS language at runtime and display setup UI in the same language.  How can I  create an MSI that will behave this way?

Answer:

There is not a way to embed different sets of UI strings in an MSI and have it decide at runtime which language to use.  To accomplish this type of behavior, you can use a setup.exe bootstrapper.

The .NET Framework 2.0 setup accomplishes this by shipping a set of resource DLLs inside of the dotnetfx.exe package and then detecting the user's OS language when setup is launched and loading the UI resource DLL that matches the OS language.

I have also heard of setups that ship with a series of transforms that contain UI strings in various languages.  In this scenario, the setup.exe bootstrapper detects the user's OS language when setup is launched and applies the appropriate transform to the base MSI to cause setup UI to display in the same language as the OS.