Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Problem using LangString with MUI_FINISHPAGE_RUN_TEXT (http://forums.winamp.com/showthread.php?t=252467)

OdessaCubbage 2nd August 2006 11:56

Problem using LangString with MUI_FINISHPAGE_RUN_TEXT
 
Hi,
I want to make the MUI_FINISHPAGE_RUN_TEXT multilingual, so I did the following:
#-------------
#Other code
LangString end ${LANG_ENGLISH} "Run Program"
LangString end ${LANG_GERMAN} "Programm ausführen"
!define MUI_FINISHPAGE_RUN_TEXT "$(end)"
#Other code
#-------------

But that's not working. After I compiled the script, there is nothing shown next to the checkbox. Any ideas?

kichik 2nd August 2006 12:25

Define the language strings after you include the language files. This way, ${LANG_*} will contain an actual value.

OdessaCubbage 2nd August 2006 13:16

Works fine, but now there's no text above the FINISHPAGE_RUN_TEXT. Hope you can help me:

SetCompressor lzma
!define Version "2.5"
!include "MUI.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
LangString beenden ${LANG_ENGLISH} "Run WinSudoku"
LangString beenden ${LANG_GERMAN} "WinSudoku ausführen"
!define MUI_FINISHPAGE_RUN "${INSTDIR}\WinSudoku.exe"
!define MUI_FINISHPAGE_RUN_TEXT "$(beenden)"
!insertmacro MUI_PAGE_FINISH


!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
XPStyle on
Name "Winsudoku 2.5"
OutFile "Winsudoku Installation.exe"
InstallDir "$PROGRAMFILES\WinSudoku"
LangString begin ${LANG_ENGLISH} "This program will install WinSudoku ${Version} on your computer. Do you wish to continue?"
LangString begin ${LANG_GERMAN} "Dieses Programm wird WinSudoku ${Version} auf Ihrem Computer installieren. Möchten Sie fortfahren?"

Function .onInit
MessageBox MB_YESNO|MB_ICONINFORMATION "$(begin)" IDNO no IDYES gogogo
no:
Abort
gogogo:
FunctionEnd
LicenseForceSelection radiobuttons


Section "Program"
SetOutPath "$INSTDIR"
File "WinSudoku.exe"
File "Readme.txt"
File "ChangeLog.txt"
SetOutPath "$INSTDIR\DailySudoku"
File "DailySudoku.exe"
WriteUninstaller "Uninstall.exe"
CreateDirectory "$SMPROGRAMS\WinSudoku"
CreateShortCut "$SMPROGRAMS\WinSudoku\WinSudoku.lnk" "$INSTDIR\WinSudoku.exe"
CreateShortCut "$SMPROGRAMS\WinSudoku\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
SectionEnd

Section un.Uninstall
Delete "$INSTDIR\WinSudoku.exe"
Delete "$INSTDIR\Readme.txt"
Delete "$INSTDIR\ChangeLog.txt"
Delete "$INSTDIR\DailySudoku\DailySudoku.exe"
RMDir "$INSTDIR\DailySudoku"
Delete "$INSTDIR\Uninstall.exe"
Delete "$SMPROGRAMS\WinSudoku\WinSudoku.lnk"
Delete "$SMPROGRAMS\WinSudoku\Uninstall.lnk"
RMDir "$SMPROGRAMS\WinSudoku"
RMDir "..\WinSudoku"
RMDir "$INSTDIR"
SectionEnd

kichik 2nd August 2006 14:23

MUI_LANGUAGE must be inserted after all page macros.

OdessaCubbage 13th August 2006 12:12

Thanks for your help, kichik.


All times are GMT. The time now is 04:46.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.