cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Manuel_K
Level 4

Language-dependent component/feature at installer-runtime

Hi,

I'm building a multi-language installer at the moment (Basic MSI) with two languages (german & english).

I've also included a feature for demo data. I have sepperate demo date for german and english installations. So I've create a feature "demo data" which includes two components DemoDataDE and DemoDataEN. I've set the "language" property of the components, but it installs the english one regardless of the choosen installer language. I've already figured this out - the language property is build-time only, not run-time.

How do I set up my configuration? Two features are also possible, but I don't know how I can set them to "choose only one, not both". Best would be if the respective language-dependent feature isn't visible to the user at all. I presume I can do it with the component condition property, but I can't find any overview how I can check for the choosen installer language.

I'm using IS 2010 Premier.
Labels (1)
0 Kudos

(7) Replies
Manuel_K
Level 4

OK, I've found the component condition: ProductLanguage=.
Anyway, is there any way to define language dependent features?
0 Kudos
girishkatti123
Level 7

The other method is to use SystemLanguageID to condition your component.
Condition the component with SystemLanguageID=1033 to install only English files and for German use SystemLanguageID=1031.
Do check the correct language code for your environment.
0 Kudos
Tim_Mayert
Level 9

My install also contains multiple languages and I am using a Selection Tree control to show all the languages so the user can choose which languages to install.

I have all the features set to an Install Level of 200 to start with so that they are all shown as unselected.

I then have each Language feature set with a condition to set it's install level to 1 if the system is running under that language OS. I am using the following to set it:

So for English I am using: SystemLanguageID=1033
For German it is: SystemLanguageID=1031

and so on for all supported languages.

I started with a basic test of running the install under English and the Feature in the Selection Tree remains crossed out and therefore not showing that it will be installed.

what do I have to do to get the selection tree to correctly have the Language selected according to the language of the OS?

Thanks,
0 Kudos
chandu_mca06
Level 4

If I am not wrong you want to dispaly the feature according to the OS language. If yes it is very simple. Writeinstallscript function to get the locale info from th OS registry and store the result in some public property.

Now in component condition ="GERMAN"

"GERMAN" is the string which u need to assign to the property according to the language code getting from windows registry using by if else condition.

In the above example if you give the condition like this whenever the property is set to german then only the component will be installed.

Sequence this custom action in UI sequence as first action so that while installer initialisation the code will be executed and the components will be installed accordingly.
0 Kudos
Tim_Mayert
Level 9

Actually all language selections (features) are displayed, but are currently unselected. This is a MSI only install project.

What I need is for the language (feature) of the current OS language to be selected and the rest remain unselected until the user selects them.

As stated I have the language features set to be on (Install Level set to 1) if the SystemLanguageID is equal to the OS language for that feature. I figured that this would the turn on that feature, but it did not seem to work. So why is this not working? does it perform this SystemLanguageID check after the UI? I do not think so, but I am just wondering why it is not currently working as expected.
0 Kudos
Tim_Mayert
Level 9

Okay this is still an issue for me. I checked the log at the point of that dialob box and noticed that the SystemLanguageID property was not set yet. I then canceled the install and checked the log and the SystemLanguageID property was correctly set to the language of the OS.

So it looks like the SystemLanguageID property does not get set during the UI phase of the install. If this is the case then how can I get the system langauge in UI mode? Does this mean I'll have to write a custom action to get this? Or is there a way for the install to set the SystemLanguageID property before the UI phase so that it will be retrieved when I need it?

Thanks for any input.
0 Kudos
Nick_Umanski
Level 7

I've wrestled with this problem recently and my solution was to use the String tables to create the necessary condition. My release supports 15 languages, I have a localised property called LangString which is set to "English", "French", "German" etc in each string table. I have a CA which sets a public property LANGUAGE=LangString very early in the sequence and then I use this public property to condition out the features as necessary. I assume it could be used in an individual component.

I don't know if I could have used the localised property LangString directly, it didn't work the first time I tried that, but I later discovered a different issue and had the Public property in place by then.

The issue that I have found though is that while this works for a base OS language, it doesn't for an installed language pack. So if I have a base OS of English with a French language pack installed, InstallShield thinks it is English. I can use the Win32 API call to GetSystemDefaultUILanguage to get the language pack, but although I could then condition the relevant language features accordingly, the InstallShield UI is wrong.

So how can I override InstallShields language detection mechanism to use the language pack language rather than the base OS language?

Having said that I do actually want to do this as a silent install, but I'm concerned that the likes of [ProgramFilesFolder] will be set up wrong depending on this, particularly some of the more exotic languages I have to support such as Arabic.
0 Kudos