Variable substituion in localization variables
Posted: Thu May 03, 2007 4:59 am
Hi!
I am experiencing some strange problems with localization variables that contain variable references again. For example, my translations.German contains the line
Die Installation ist fehlgeschlagen: $LASTERROR$.
that is linked to a localization variable named "FinishMainText5", which is displayed in a dialog if necessary. However, in case of an error, only the text
Die Installation ist fehlgeschlagen: .
is displayed in the dialog although $LASTERROR$ is not empty as a MessageBox call confirms.
I have now changed the line in the translations.German file to
Die Installation ist fehlgeschlagen: $LastErrorLocalized$.
and call
Set Variable LastErrorLocalized to $LASTERROR$
right before the dialog is displayed. This works!
So my assumption is that there's a difference between pre-defined variables and user-defined variables. It seems that pre-defined variables in localization variables are resolved e.g. when the setup starts, while user-defined variables are not resolved until the localization variable is evaluated. Is this correct?
I am experiencing some strange problems with localization variables that contain variable references again. For example, my translations.German contains the line
Die Installation ist fehlgeschlagen: $LASTERROR$.
that is linked to a localization variable named "FinishMainText5", which is displayed in a dialog if necessary. However, in case of an error, only the text
Die Installation ist fehlgeschlagen: .
is displayed in the dialog although $LASTERROR$ is not empty as a MessageBox call confirms.
I have now changed the line in the translations.German file to
Die Installation ist fehlgeschlagen: $LastErrorLocalized$.
and call
Set Variable LastErrorLocalized to $LASTERROR$
right before the dialog is displayed. This works!
So my assumption is that there's a difference between pre-defined variables and user-defined variables. It seems that pre-defined variables in localization variables are resolved e.g. when the setup starts, while user-defined variables are not resolved until the localization variable is evaluated. Is this correct?