Skip to content
⌘ NSIS Forum Archive

Define MUI_FINISHPAGE_SHOWREADME_TEXT based on language

3 posts

ccaron2#

Define MUI_FINISHPAGE_SHOWREADME_TEXT based on language

Hello,

In our *.nsis file we have the following:

!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"

The problem is that no matter which installation language is selected by the user, the text "Create Desktop Shortcut" is always displayed in English. For example if the user selects Spanish as the installation language, the installer screens are all displayed in Spanish excepts for the "Create Desktop Shortcut" label (near the checkbox on the last screen, see the example.png attache file).

Is it possible to define (or re-define) MUI_FINISHPAGE_SHOWREADME_TEXT based on the language selected by the user?

Thanks!
Anders#
Use langstrings:

!include MUI.nsh
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_SHOWREADME "$windir\Explorer.exe"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "$(FINISH_READMETXT)"
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Spanish"
LangString FINISH_READMETXT ${LANG_PORTUGUESE} "Foo"
LangString FINISH_READMETXT ${LANG_SPANISH} "Bar"

Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd