This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Language-dependent component/feature at installer-runtime
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Feb 17, 2010
04:35 AM
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.
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.
(7) Replies
‎Feb 17, 2010
11:24 PM
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.
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.
‎Nov 25, 2010
04:21 PM
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,
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,
‎Jan 06, 2011
07:20 AM
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.
Now in component condition
"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.
‎Jan 06, 2011
12:23 PM
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.
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.
‎Jan 24, 2011
10:43 AM
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.
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.
‎Feb 23, 2011
10:13 AM
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.
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.