Wrong Language used
I have the following code:
LangString AlreadyInstalled ${LANG_ENGLISH} "An installation of ${PRODUCT_NAME} ${PRODUCT_VERSION} has been found.$\nUninstall it before trying to re-install."
LangString AlreadyInstalled ${LANG_FRENCH} "${PRODUCT_NAME} ${PRODUCT_VERSION} est deja installe.$\nDesinstallez-le avant de le re-installer."
Function .onInit
MessageBox MB_OK "1. ENG ${LANG_ENGLISH} FR ${LANG_FRENCH} CUR $LANGUAGE"
!insertmacro MUI_LANGDLL_DISPLAY
MessageBox MB_OK "2. ENG ${LANG_ENGLISH} FR ${LANG_FRENCH} CUR $LANGUAGE"
; Prevent re-installing
ReadRegStr $TMP ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName"
IfErrors NotInstalled Installed
Installed:
MessageBox MB_OK "2a. ENG ${LANG_ENGLISH} FR ${LANG_FRENCH} CUR $LANGUAGE"
MessageBox MB_OK|MB_ICONSTOP "$(AlreadyInstalled)"
MessageBox MB_OK "2b. ENG ${LANG_ENGLISH} FR ${LANG_FRENCH} CUR $LANGUAGE"
Abort
NotInstalled:
FunctionEnd
The message boxes show
1. ENG 1033 FR 1036 CUR 1033
2. ENG 1033 FR 1036 CUR 1036
2a. ENG 1033 FR 1036 CUR 1036
An installation of MyProduct 1.0 has been found. Uninstall it before trying to re-install.
2b. ENG 1033 FR 1036 CUR 1036
Why do I get the English message whereas $LANGUAGE is set to French?
Thanks,
Tieum