Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   LangString and .onInit (http://forums.winamp.com/showthread.php?t=297465)

XRaptor 16th September 2008 13:26

LangString and .onInit
 
Hi, I need to use MessageBox in .onInit part for telling user some information and maybe abort install process. I need to display language specific message. But it not works, it always display the same string, no matter which language is selected. Is there any way without using variables and testing $LANGUAGE?

Quote:


LangString MSG1 ${LANG_CZECH} "yyy"
LangString MSG1 ${LANG_ENGLISH} "xxx"

...

Function .onInit

!insertmacro MUI_LANGDLL_DISPLAY

ReadRegStr $R0 HKLM \
"SOFTWARE\something" \
"something"

${If} $R0 == ""
;MessageBox MB_OK $(MSG1) IDOK
Abort
${EndIf}

FunctionEnd

kichik 16th September 2008 16:57

Language strings use the first selected language in .onInit. You can either wait for .onGUIInit or use the good old ${Switch} on $LANGUAGE.


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.