4
votes

Not quite sure how to accomplish this... I'm using NSIS to build an installer for some apps, and the installer supports English and Japanese. How would I tell NSIS to use one license file (license.txt) if the user selected English, and a different file (license.ja-JP.txt) if they selected Japanese?

2

2 Answers

3
votes
0
votes

To summarize it, try something like this. Order is very important.

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Portuguese"

LicenseLangString MUILicense ${LANG_ENGLISH} "C:\EULA\EULA_EN.txt"
LicenseLangString MUILicense ${LANG_FRENCH} "C:\EULA\EULA_FR.txt"
LicenseLangString MUILicense ${LANG_SPANISH} "C:\EULA\EULA_ES.txt"
LicenseLangString MUILicense ${LANG_ITALIAN} "C:\EULA\EULA_IT.txt"
LicenseLangString MUILicense ${LANG_PORTUGUESE} "C:\EULA\EULA_PT.txt"

!define MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_PAGE_LICENSE "$(MUILicense)"