[Solved] Feature Selection and Languages - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

TomD
Posts: 19
Joined: Wed Mar 11, 2009 10:26 pm

[Solved] Feature Selection and Languages

Hi,

at first I have to say, I'm completely new with Advanced Installer.
We used NSIS before, but know I have to test your product.

Okay...
What I want to do is the following:

I need to create an installer that give me three option:

- Option 1 German
- Option 2 English A
- Option 3 English B

So, the user has to select ON of these options. The other options have to be disabled, so just on option can be selected.
If the user selects "Option 1 German", the installer should change the language of the installation process to german and install german software.

The same for the other two options.

I used the help but did not find something about this specific scenario.


Thankful for any hint.

Greets
Tom
Last edited by TomD on Thu Mar 12, 2009 6:14 pm, edited 1 time in total.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Feature Selection and Languages

Hi Tom,

Unfortunately the installation language cannot be changed after the MSI starts running. However, you can use an EXE bootstrapper to show a language selection dialog before the install process:
- in the Languages tab of the "Translations" page select the languages you want to include in your project
- select the "Create only a multilingual package" option
- in the Bootstrapper tab of the "Media" page select the "Display language selection dialog (for multi-language packages)" option
- select the "Include install files in EXE" option to generate a single EXE setup file (this is optional)

When the package is launched through the EXE it will show a language selection dialog with the languages you selected in the project.

If you want to install different files for each language, you can try this approach:
- in the Organization page create a different feature for each language
- in the Feature Properties page use the "Conditional install level" link to show the Edit Conditional Levels dialog
- use the ProductLanguage property to create conditional install levels for each feature; for example, for the German feature the conditional install levels should look like this:

Code: Select all

ProductLanguage = 1031                1
ProductLanguage <> 1031               0
- the value 1031 is the locale ID for German (Germany), you can find a complete list of ID's here
- in the Files and Folders page use the "Feature" combo on the toolbar to select the German feature
- in the folder which should contain the language dependent files create a new regular folder
- rename it to something meaningful for the language of the files, for example "German" (the folder you are creating will be included in the current feature selected on the toolbar, so German folder is for German feature, English folder for English feature etc.)
- add in this subfolder the German files
- double-click the folder or use its "Properties" context menu to show the Edit Folder dialog
- enable the "Install folder content into the parent folder" option
- repeat the steps for the other languages

In the end you should have a different subfolder for each language, each using a different feature. The conditional install levels will use the installation language to determine which feature will be installed (for example, the German feature should be installed when the installation runs in German).

The files which are common to all languages can be placed directly in the target folder. Also, in the "Organization" page you can add them in a common feature.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TomD
Posts: 19
Joined: Wed Mar 11, 2009 10:26 pm

Re: Feature Selection and Languages

Will try this.

Thank you for fast responding!
TomD
Posts: 19
Joined: Wed Mar 11, 2009 10:26 pm

Re: Feature Selection and Languages

Dude, you made my day!

Works!
Thanks again

Greets
Tom
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Feature Selection and Languages

Hi,

I would like to follow the same idea, to install certain features depending on the language. In my case its the question of installing product documentation. I want to install the German documentation as default on a German system, but I don't want to disable the other features, I only want to not install them by default, so that the user is able to select other languages on demand.

Hence I follow the post and use SystemLanguageID instead of ProductLanguage you proposed. How do I have to set the InstallLevels to get this working? Because InstallLevel = 0 is disabling the feature completely ...

What do I need to change?

Thanks,

Roland
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: [Solved] Feature Selection and Languages

Hi Roland,

This is an old post, since then we have improved our support, so now all you need to do is to go to Organization page, select your feature and select the option "Install based on condition",
then set the condition field to something like this:

Code: Select all

ProductLanguage = 1031
In this example the code 1031 is for German, you can find a complete list with the decimal codes here.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: [Solved] Feature Selection and Languages

Hi Bogdan,

I tried your way, and also as second possibility to set the Installation Behavior to be installed by default and adding an additional install condition at the bottom with InstallLevel = 100 when SystemLanguageID<>1031 (system language is important, not the product language).

Both ways are showing the behavior, that the feature is never or always installed (depending on the system language), but this action can't be changed from the user in CustomizeDlg dialog (in fact, you can change the installation, but the conditions set are stronger and overrule the user's setting).

My goal was to lead the user to use specific features (like German documentation on a German OS), but not force him to do so. Unfortunately both, the "Install Based on Condition" and an additional install condition to change InstallLevel will change the install status permanently, nevertheless if the user changes it, or not. In my case the German feature will always be installed or not depending on the OS language I use for testing.

How can I change the behavior as needed by me? Would be using a Custom Action be a option to set a certain feature installation state once before showing the CustomizeDlg dialog on a first time installation? Can you guide me through that?

Regards,

Roland
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: [Solved] Feature Selection and Languages

Hi Roland,

You don't need to play with the InstallLevel. Just set the condition, I made a full test and it worked, i.e. if I select the feature to install even if the condition is not true the feature does get installed.

Please see the sample I attached to this forums post.

Best regards,
Bogdan
Attachments
sample.aip
(14.79 KiB) Downloaded 586 times
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: [Solved] Feature Selection and Languages

Hi Bogdan,

true, this works. I don't know, why it didn't during my first try.

Thanks for helping!

Regards,

RM

Return to “Common Problems”