From 7bad50337cdaacb1875e8212610431e127026fce Mon Sep 17 00:00:00 2001 From: joostverburg Date: Thu, 26 Sep 2002 18:00:16 +0000 Subject: [PATCH] fixed temp var bug, uses LANG vars git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1194 212acab6-be3b-0410-9dea-997c60f758d6 --- Examples/Modern UI/MultiLanguage.nsi | 104 +++++++++++++-------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/Examples/Modern UI/MultiLanguage.nsi b/Examples/Modern UI/MultiLanguage.nsi index 2c117554..a3961639 100644 --- a/Examples/Modern UI/MultiLanguage.nsi +++ b/Examples/Modern UI/MultiLanguage.nsi @@ -17,8 +17,8 @@ LoadLanguageFile "${NSISDIR}\Contrib\Language files\Dutch.nlf" ;General - Name /LANG=1033 "${NAME} ${VERSION}" - Name /LANG=1043 "${NAME} ${VERSION}" + Name /LANG=${LANG_ENGLISH} "${NAME} ${VERSION}" + Name /LANG=${LANG_DUTCH} "${NAME} ${VERSION}" OutFile "Multilanguage.exe" SetOverwrite on @@ -26,23 +26,23 @@ !insertmacro MUI_INTERFACE "modern.exe" "adni18-installer-C-no48xp.ico" "adni18-uninstall-C-no48xp.ico" "modern.bmp" "smooth" "$9" ;$9 is the variable used to store the current page, do not use this var! ;License dialog - LicenseText /LANG=1033 "Press Page Down to see the rest of the agreement." - LicenseText /LANG=1043 "Druk op Page Down om de rest van de overeenkomt te zien." - LicenseData /LANG=1033 "License.txt" - LicenseData /LANG=1043 "License.txt" + LicenseText /LANG=${LANG_ENGLISH} "Press Page Down to see the rest of the agreement." + LicenseText /LANG=${LANG_DUTCH} "Druk op Page Down om de rest van de overeenkomt te zien." + LicenseData /LANG=${LANG_ENGLISH} "License.txt" + LicenseData /LANG=${LANG_DUTCH} "License.txt" ;Component-select dialog - ComponentText /LANG=1033 "Check the components you want to install and uncheck the components you don't want to install. Click Next to continue." - ComponentText /LANG=1043 "Selecteer de onderdelen die u wilt installer en deselecteer de onderdelen die u niet wilt installeren. Klik Volgende om verder te gaan." + ComponentText /LANG=${LANG_ENGLISH} "Check the components you want to install and uncheck the components you don't want to install. Click Next to continue." + ComponentText /LANG=${LANG_DUTCH} "Selecteer de onderdelen die u wilt installer en deselecteer de onderdelen die u niet wilt installeren. Klik Volgende om verder te gaan." ;Folder-select dialog InstallDir "$PROGRAMFILES\${NAME}" - DirText /LANG=1033 "Setup will install ${NAME} in the following folder.$\r$\n$\r$\nTo install in this folder, click Install. To install in a different folder, click Browse and select another folder." " " - DirText /LANG=1043 "Setup zal ${NAME} in de volgende map installeren.$\r$\n$\r$\nOm in een deze map te intalleren, klik Installeer. Om in een andere map te installeren, klik Bladeren en selecteerd een andere map." " " + DirText /LANG=${LANG_ENGLISH} "Setup will install ${NAME} in the following folder.$\r$\n$\r$\nTo install in this folder, click Install. To install in a different folder, click Browse and select another folder." " " + DirText /LANG=${LANG_DUTCH} "Setup zal ${NAME} in de volgende map installeren.$\r$\n$\r$\nOm in een deze map te intalleren, klik Installeer. Om in een andere map te installeren, klik Bladeren en selecteerd een andere map." " " ;Uninstaller - UninstallText /LANG=1033 "This will uninstall ${NAME} from your system." - UninstallText /LANG=1043 "Dit programma zal ${NAME} verwijderen van uw systeem." + UninstallText /LANG=${LANG_ENGLISH} "This will uninstall ${NAME} from your system." + UninstallText /LANG=${LANG_DUTCH} "Dit programma zal ${NAME} verwijderen van uw systeem." ;Things that need to be extracted on startup (keep these lines before any File command!) ReserveFile "${NSISDIR}\Plugins\LangDLL.dll" @@ -82,13 +82,13 @@ SectionEnd Function .onInit - LangDLL::LangDialog "Installer Language" "Please select a language." "2F" "English" "${LANG_ENGLISH}" "Nederlands" "${LANG_DUTCH}" "8" "Tahoma" ;2 is the number of lanugages, F means change font + LangDLL::LangDialog "Installer Language" "Please select a language." "2F" "English" "${LANG_ENGLISH}" "Nederlands" "${LANG_DUTCH}" "8" "Tahoma" ;2 is the number of lanugages, F means change font - Pop $LANGUAGE - StrCmp $LANGUAGE "cancel" 0 +2 - Abort + Pop $LANGUAGE + StrCmp $LANGUAGE "cancel" 0 +2 + Abort - StrCmp $LANGUAGE 1043 "" +2 + StrCmp $LANGUAGE ${LANG_DUTCH} "" +2 SectionSetText ${SecCreateUninst} "Deïnstallatie programma" FunctionEnd @@ -98,20 +98,20 @@ Function .onInitDialog !insertmacro MUI_INNERDIALOG_INIT !insertmacro MUI_INNERDIALOG_START 1 - !insertmacro MUI_INNERDIALOG_TEXT 1033 1040 "If you accept all the terms of the agreement, choose I Agree to continue. If you choose Cancel, Setup will close. You must accept the agreement to install ${NAME}." - !insertmacro MUI_INNERDIALOG_TEXT 1043 1040 "Als u de overeenkomt accepteert, kies Akkoord om verder te gaan. Als u Annuleren kiest zal Setup sluiten. U moet met de overeenkomst acceptren om ${NAME} te installeren." + !insertmacro MUI_INNERDIALOG_TEXT ${LANG_ENGLISH} 1040 "If you accept all the terms of the agreement, choose I Agree to continue. If you choose Cancel, Setup will close. You must accept the agreement to install ${NAME}." + !insertmacro MUI_INNERDIALOG_TEXT ${LANG_DUTCH} 1040 "Als u de overeenkomt accepteert, kies Akkoord om verder te gaan. Als u Annuleren kiest zal Setup sluiten. U moet met de overeenkomst acceptren om ${NAME} te installeren." !insertmacro MUI_INNERDIALOG_STOP 1 !insertmacro MUI_INNERDIALOG_START 2 - !insertmacro MUI_INNERDIALOG_TEXT 1033 1042 "Description" - !insertmacro MUI_INNERDIALOG_TEXT 1033 1043 "Hover your mouse over a component to see it's description." - !insertmacro MUI_INNERDIALOG_TEXT 1043 1042 "Beschrijving" - !insertmacro MUI_INNERDIALOG_TEXT 1043 1043 "Beweeg uw muis over een onderdeel om een beschrijving te zien." + !insertmacro MUI_INNERDIALOG_TEXT ${LANG_ENGLISH} 1042 "Description" + !insertmacro MUI_INNERDIALOG_TEXT ${LANG_ENGLISH} ${LANG_DUTCH} "Hover your mouse over a component to see it's description." + !insertmacro MUI_INNERDIALOG_TEXT ${LANG_DUTCH} 1042 "Beschrijving" + !insertmacro MUI_INNERDIALOG_TEXT ${LANG_DUTCH} ${LANG_DUTCH} "Beweeg uw muis over een onderdeel om een beschrijving te zien." !insertmacro MUI_INNERDIALOG_STOP 2 !insertmacro MUI_INNERDIALOG_START 3 - !insertmacro MUI_INNERDIALOG_TEXT 1033 1041 "Destination Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1033 1041 "Installatie Map" + !insertmacro MUI_INNERDIALOG_TEXT ${LANG_ENGLISH} 1041 "Destination Folder" + !insertmacro MUI_INNERDIALOG_TEXT ${LANG_ENGLISH} 1041 "Installatie Map" !insertmacro MUI_INNERDIALOG_STOP 3 !insertmacro MUI_INNERDIALOG_END @@ -135,28 +135,28 @@ Function SetPage !insertmacro MUI_PAGE_INIT !insertmacro MUI_PAGE_START 1 - !insertmacro MUI_HEADER_TEXT 1033 "License Agreement" "Please review the license terms before installing ${NAME}." - !insertmacro MUI_HEADER_TEXT 1043 "Licentie Overeenkomst" "Lees de licentie overeenkomst voordat u ${NAME} installeerd." + !insertmacro MUI_HEADER_TEXT ${LANG_ENGLISH} "License Agreement" "Please review the license terms before installing ${NAME}." + !insertmacro MUI_HEADER_TEXT ${LANG_DUTCH} "Licentie Overeenkomst" "Lees de licentie overeenkomst voordat u ${NAME} installeerd." !insertmacro MUI_PAGE_STOP 1 !insertmacro MUI_PAGE_START 2 - !insertmacro MUI_HEADER_TEXT 1033 "Choose Components" "Choose the components you want to install." - !insertmacro MUI_HEADER_TEXT 1043 "Kies Onderdelen" "Kies de onderdelen die u wilt installeren." + !insertmacro MUI_HEADER_TEXT ${LANG_ENGLISH} "Choose Components" "Choose the components you want to install." + !insertmacro MUI_HEADER_TEXT ${LANG_DUTCH} "Kies Onderdelen" "Kies de onderdelen die u wilt installeren." !insertmacro MUI_PAGE_STOP 2 !insertmacro MUI_PAGE_START 3 - !insertmacro MUI_HEADER_TEXT 1033 "Choose Install Location" "Choose the folder in which to install ${NAME}." - !insertmacro MUI_HEADER_TEXT 1043 "Kies Installatie Locatie" "Kies de map waarin u ${NAME} in wilt installeren." + !insertmacro MUI_HEADER_TEXT ${LANG_ENGLISH} "Choose Install Location" "Choose the folder in which to install ${NAME}." + !insertmacro MUI_HEADER_TEXT ${LANG_DUTCH} "Kies Installatie Locatie" "Kies de map waarin u ${NAME} in wilt installeren." !insertmacro MUI_PAGE_STOP 3 !insertmacro MUI_PAGE_START 4 - !insertmacro MUI_HEADER_TEXT 1033 "Installing" "Please wait while ${NAME} is being installed." - !insertmacro MUI_HEADER_TEXT 1043 "Bezig met installeren" "Een ogenblik geduld terwijl ${NAME} wordt geinstalleerd." + !insertmacro MUI_HEADER_TEXT ${LANG_ENGLISH} "Installing" "Please wait while ${NAME} is being installed." + !insertmacro MUI_HEADER_TEXT ${LANG_DUTCH} "Bezig met installeren" "Een ogenblik geduld terwijl ${NAME} wordt geinstalleerd." !insertmacro MUI_PAGE_STOP 4 !insertmacro MUI_PAGE_START 5 - !insertmacro MUI_HEADER_TEXT 1033 "Finished" "Setup was completed successfully." - !insertmacro MUI_HEADER_TEXT 1043 "Gereed" "De installatie is succesvol verlopen." + !insertmacro MUI_HEADER_TEXT ${LANG_ENGLISH} "Finished" "Setup was completed successfully." + !insertmacro MUI_HEADER_TEXT ${LANG_DUTCH} "Gereed" "De installatie is succesvol verlopen." !insertmacro MUI_PAGE_STOP 5 !insertmacro MUI_PAGE_END @@ -167,11 +167,11 @@ Function .onMouseOverSection !insertmacro MUI_DESCRIPTION_INIT - !insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecCopyUI} "Copy the modern.exe file to the application folder." - !insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecCreateUninst} "Create a uninstaller which can automatically delete ${NAME}." + !insertmacro MUI_DESCRIPTION_TEXT ${LANG_ENGLISH} ${SecCopyUI} "Copy the modern.exe file to the application folder." + !insertmacro MUI_DESCRIPTION_TEXT ${LANG_ENGLISH} ${SecCreateUninst} "Create a uninstaller which can automatically delete ${NAME}." - !insertmacro MUI_DESCRIPTION_TEXT 1043 ${SecCopyUI} "Kopieër modern.exe naar de programma map." - !insertmacro MUI_DESCRIPTION_TEXT 1043 ${SecCreateUninst} "Maak een deïnstallatie programma dat ${NAME} automatisch kan verwijderen." + !insertmacro MUI_DESCRIPTION_TEXT ${LANG_DUTCH} ${SecCopyUI} "Kopieër modern.exe naar de programma map." + !insertmacro MUI_DESCRIPTION_TEXT ${LANG_DUTCH} ${SecCreateUninst} "Maak een deïnstallatie programma dat ${NAME} automatisch kan verwijderen." !insertmacro MUI_DESCRIPTION_END @@ -179,8 +179,8 @@ FunctionEnd Function .onUserAbort - !insertmacro MUI_ABORTWARNING 1033 "Are you sure you want to quit ${NAME} Setup?" - !insertmacro MUI_ABORTWARNING 1043 "Weet u zeker dat u ${NAME} Setup wilt afsluiten?" + !insertmacro MUI_ABORTWARNING ${LANG_ENGLISH} "Are you sure you want to quit ${NAME} Setup?" + !insertmacro MUI_ABORTWARNING ${LANG_DUTCH} "Weet u zeker dat u ${NAME} Setup wilt afsluiten?" !insertmacro MUI_ABORTWARNING_END FunctionEnd @@ -210,14 +210,14 @@ SectionEnd Function un.onInit - Push ${TEMP1} + Push ${MUI_TEMP1} ;Get the language from the registry (save by uninstaller) - ReadRegStr ${TEMP1} HKCU "Software\${NAME}" "Installer Language" - StrCmp ${TEMP1} "" +2 - StrCpy $LANGUAGE ${TEMP1} + ReadRegStr ${MUI_TEMP1} HKCU "Software\${NAME}" "Installer Language" + StrCmp ${MUI_TEMP1} "" +2 + StrCpy $LANGUAGE ${MUI_TEMP1} - Pop ${TEMP1} + Pop ${MUI_TEMP1} FunctionEnd @@ -232,18 +232,18 @@ Function un.SetPage !insertmacro MUI_PAGE_INIT !insertmacro MUI_PAGE_START 1 - !insertmacro MUI_HEADER_TEXT 1033 "Uninstall ${NAME}" "Remove ${NAME} from your system." - !insertmacro MUI_HEADER_TEXT 1043 "Deïnstalleer ${NAME}" "Verwijder ${NAME} van uw system." + !insertmacro MUI_HEADER_TEXT ${LANG_ENGLISH} "Uninstall ${NAME}" "Remove ${NAME} from your system." + !insertmacro MUI_HEADER_TEXT ${LANG_DUTCH} "Deïnstalleer ${NAME}" "Verwijder ${NAME} van uw system." !insertmacro MUI_PAGE_STOP 1 !insertmacro MUI_PAGE_START 2 - !insertmacro MUI_HEADER_TEXT 1033 "Uninstalling" "Please wait while ${NAME} is being uninstalled." - !insertmacro MUI_HEADER_TEXT 1043 "Bezig met deïnstalleren" "Een ogenblik gedult terwijl ${NAME} van uw system wordt verwijderd." + !insertmacro MUI_HEADER_TEXT ${LANG_ENGLISH} "Uninstalling" "Please wait while ${NAME} is being uninstalled." + !insertmacro MUI_HEADER_TEXT ${LANG_DUTCH} "Bezig met deïnstalleren" "Een ogenblik gedult terwijl ${NAME} van uw system wordt verwijderd." !insertmacro MUI_PAGE_STOP 2 !insertmacro MUI_PAGE_START 3 - !insertmacro MUI_HEADER_TEXT 1033 "Finished" "${NAME} has been removed from your system." - !insertmacro MUI_HEADER_TEXT 1043 "Gereed" "${NAME} is verwijderd van uw systeem." + !insertmacro MUI_HEADER_TEXT ${LANG_ENGLISH} "Finished" "${NAME} has been removed from your system." + !insertmacro MUI_HEADER_TEXT ${LANG_DUTCH} "Gereed" "${NAME} is verwijderd van uw systeem." !insertmacro MUI_PAGE_STOP 3 !insertmacro MUI_PAGE_END