Installer: Reset to English instead of Arabic with an invalid language ID

This commit is contained in:
Birunthan Mohanathas
2013-10-17 09:32:53 +03:00
parent d087a7db42
commit 1940b7f97c
2 changed files with 11 additions and 3 deletions

View File

@ -138,7 +138,7 @@ Function .onInit
${OrIf} $0 <> $LANGUAGE
${AndIf} $NonDefaultLanguage != 1
; New install or better match
LangDLL::LangDialog "$(^SetupCaption)" "Please select the installer language.$\n$(SELECTLANGUAGE)" AC ${LANGUAGES} ""
LangDLL::LangDialog "$(^SetupCaption)" "Please select the installer language.$\n$(SELECTLANGUAGE)" AC ${LANGDLL_PARAMS} ""
Pop $0
${If} $0 == "cancel"
Abort
@ -207,6 +207,12 @@ Function .onInit
Quit
${EndIf}
${EndIf}
; If the language was set to a non-existent language, reset it back to English.
${WordFind} ",${LANGUAGE_IDS}" ",$LANGUAGE," "E+1{" $0
${If} ${Errors}
StrCpy $LANGUAGE "1033"
${EndIf}
${Else}
; Exchange settings with user instance
!insertmacro UAC_AsUser_Call Function ExchangeSettings ${UAC_SYNCREGISTERS}