Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable user to change setup language in Burn UI #5934

Open
denis-gz opened this issue Jan 16, 2019 · 9 comments
Open

Enable user to change setup language in Burn UI #5934

denis-gz opened this issue Jan 16, 2019 · 9 comments

Comments

@denis-gz
Copy link

As of Wix 3.11, it is possible to create localized versions of Burn installer and present UI in user's language, detected from system settings. However, there are no means to change language selection in installer's UI, for whatever reason it might be needed. The only way now to switch to another language is to run the installer with the "-lang" option, which is not obvious for an average user. Or, one could change their system settings temporary, but it's not always possible and requires some experience as well.

The best solution to this inability would be to extend theme support in WixStdBA module, to include some combo-box control presenting the list of languages. For this to work, the package developer will need to adjust the theme to include names of all available localizations, set size and position, and set a flag (attribute) to enable the control. The user then would be able to make language selection on the fly, without the need to restart installer.

@denis-gz
Copy link
Author

Implementation is ready, testing locally.

@robmen
Copy link
Member

robmen commented Jan 16, 2019

Please, please, please don't just show up with a PR for a feature with implications this large. Please read through our development guide: http://wixtoolset.org/development/ how to get started.

@denis-gz
Copy link
Author

denis-gz commented Jan 17, 2019

Yes I have read it and I thought rather than describing how I'm going to implement it, I'd better share what I already have. I'm still fighting with test suite and trying to revive all the former VS versions on my machine, which MSBuild for some reason doesn't detect, but debug code works, and I consider it good enough to present for review.

@robmen
Copy link
Member

robmen commented Jan 17, 2019

You should know we're not taking new functionality into WiX v3.x so you'll want to target WiX v4 Burn. These are the things we would have discussed before sending a PR.

@denis-gz
Copy link
Author

denis-gz commented Jan 17, 2019

No, I'm afraid I don't want to target WiX 4 any time soon. I'll leave the code in my fork then, in case someone is interested.

@robmen
Copy link
Member

robmen commented Jan 17, 2019

That's totally fine (note: to be compliant with the OSS license you do need to publish any changes you make to the WiX Toolset, so your fork serves that purpose as well). If you'd like to see this feature in future releases of WiX and not have to maintain your fork forever, then it'd be good to discuss it as per the development guide: http://wixtoolset.org/development/

denis-gz pushed a commit to denis-gz/wix3 that referenced this issue Jan 17, 2019
@denis-gz
Copy link
Author

denis-gz commented Jan 18, 2019

A little HowTo

  1. Preconditions: you have multi-language installer, based on WixStdBA (native) bootstrapper, and it is already able to switch languages using -lang <lcid> command line option. You want to enable users of your installer to switch languages on the fly, without restarting installer.
  2. Do the following: in your bundle.wxs file, add attribute ShowLanguages="yes" on the <bal:WixStandardBootstrapperApplication> element.
  3. In your theme.xml file, inside <Page Name="Install"> element, add the following control:
    <Combobox Name="LanguagesCombobox" X="-11" Y="11" Width="80" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">
    <Item Tag="1033">English</Item>
    <Item Tag="1034">Español</Item>
    <Item Tag="2052">中文</Item>
    </Combobox>
    Here, the Tag attribute contains LCID, and the Item's content specifies the language name, as will be shown in the UI. If national characters are used, as here, be sure to save the theme in UTF-8 encoding.
  4. Feel free to change attributes and content of ComboBox control as you see fit, but leave the Name and Install page parent intact, as they are predefined.
  5. When switching languages, the WixStdBALanguageId variable is updated accordingly, so it's good to use to apply appropriate transform to MSI package, e.g. <MsiProperty Name="TRANSFORMS" Value=":[WixStdBALanguageId]"/>

@barnson barnson added this to the v4.x milestone Jan 31, 2019
@py2901
Copy link

py2901 commented May 8, 2023

@denis-gz code is not building at VS 2019,
error is "Error WIXBUILD002 Error the "Microsoft Windows SDK for Windows 7 and .NET Framework 4" or "Visual Studio 2010" must be installed"

@jgiovacc-intel
Copy link

@denis-gz code is not building at VS 2019, error is "Error WIXBUILD002 Error the "Microsoft Windows SDK for Windows 7 and .NET Framework 4" or "Visual Studio 2010" must be installed"

@py2901 This happened to me and to fix it I installed Windows SDK 10.0.17134.0, and .NET Framework 4. I'm using Visual Studio 2017.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants