cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
ACordner
Occasional contributor

String in InstallScript CA always in English

I recently localized an installer project using IS2012 Spring Premier. In this project I have an InstallScript Custom Action that performs a task and updates the status message on the status dialog using the following code:

svStatus = @ID_MSG_COPYING_PREREQUISITES;

hInstall= MsiGetActiveDatabase(hMSI);
set rec = MsiCreateRecord(3);
MsiRecordSetString(rec, 1, "callAddProgressInfo");
MsiRecordSetString(rec, 2, svStatus);
MsiRecordSetString(rec, 3, "");

MsiProcessMessage(hInstall ,INSTALLMESSAGE_ACTIONSTART, rec);

MsiRecordSetInteger(rec, 1, 0);
MsiRecordSetInteger(rec, 2, 0);
MsiRecordSetInteger(rec, 3, 0);
MsiProcessMessage(hInstall ,INSTALLMESSAGE_ACTIONDATA, rec);


The custom action runs in Commit Execution in the Install Exec Sequence after the BindImage action. The custom action works as expected, however the status message is always displayed in English. My string table contains translated strings:

ID_MSG_COPYING_PREREQUISITES German: Deutsch Kopieren von SW1- und SW2 Client-Installer-Bedingungen...
ID_MSG_COPYING_PREREQUISITES English (United States) Copying SW1 and SW2 Client installer prerequisites...
ID_MSG_COPYING_PREREQUISITES Spanish: español Copiando requisitos previos del asistente de instalación de SW1 y SW2 Client...
ID_MSG_COPYING_PREREQUISITES French (France): français Copie des éléments requis pour les installateurs de SW1 et de SW2 Client...
ID_MSG_COPYING_PREREQUISITES Italian: italiano Copia dei prerequisiti di installazione di SW1 e SW2 Client in corso...
ID_MSG_COPYING_PREREQUISITES Japanese: ??? SW1 ??? SW2 Client ???????????????????...
ID_MSG_COPYING_PREREQUISITES Portuguese (Brazil): Português Copiando os pré-requisitos do instalador do SW1 e do SW2 Client...
ID_MSG_COPYING_PREREQUISITES Russian: ??????? ??????????? ??????????? ??????????? ??? ????????? ????????? SW1 ? SW2 Client...
ID_MSG_COPYING_PREREQUISITES Chinese (Simplified): ??(??) ???? SW1 ? SW2 Client ?????????...

Why won't the proper language string be displayed as ste status message?
Labels (1)
0 Kudos
2 Replies
Flexera MichaelU
Flexera

Re: String in InstallScript CA always in English

Is this in a deferred action? Most properties are not available to deferred actions, so the InstallScript engine cannot always determine which language to load. To fully support such a case, you can make the content of these strings part of your CustomActionData property.
0 Kudos
ACordner
Occasional contributor

Re: String in InstallScript CA always in English

MichaelU, thanks for your reply. As I mentioned, the custom action runs in Commit Execution in the Install Exec Sequence. I am aware of the CustomActionData usage and have used it many times successfully. But this is not a property, it is a localized string from the string table. Do I have to make it a localizable property and pass it in using CustomActionData?
0 Kudos