Hello,
Unfortunately, we do not have predefined support for such a task.
However, it is still possible to achieve this.
The property that stores the language is named
ProductLanguage and it is represented by a numeric value, whose meaning can be found in the
"ProductLanguage Property" article.
Basically, here, we will have a little script which will do the work for us. What we need to do in the script:
- get the value of the
ProductLanguage property
- based on this, set a variable to our desired value (e.g. "Ro", "En", etc.)
- set a property to the above mentioned variable's value
- write the property in the registries
Here is a sample of how our script could look like:
Code: Select all
$langMSI = AI_GetMsiProperty ProductLanguage
switch ($langMSI) {
1033 {$language = "En"}
1036 {$language = "Fr"}
}
AI_SetMsiProperty SELECTED_LANGUAGE $language
The above script can be implemented in Advanced Installer as a
PowerShellScriptInline custom action,
without sequence.
After doing so, please go to
"Dialogs" page, select the
"WelcomeDlg" dialog and then select the
"Next" button. Here, under
"Published Events" tab, please click on the
"New..." button to add an event as it follows:
Event: Execute Custom Action
Argument: PowerShellScriptInline (or however you named the custom action)
Condition: leave unchanged
Now please go to
"Registry" page and add a new value there, based on the property we've previously set in our script (i.e.
SELECTED_LANGUAGE).
Hope this helps.
Best regards,
Catalin