Archive: custom localized string


custom localized string
Hey everyone,

I have an uninstaller that shows a language pop-up and then shows another pop-up asking for user confirmation. How can I localize the message in the second pop-up according to the language chosen in the first pop-up? Here is the relevant piece of code:

Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
MessageBox MB_YESNO "This will uninstall the application. Continue?" IDYES NoAbort
Abort
NoAbort:
FunctionEnd

Thank you in advance,

Corneliu

http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.15.2


And create the Messagebox in un.onGUIInit
http://forums.winamp.com/showthread.php?t=147907


Thanks jpderuiter,

Way too complicated. I have settled for using the system locale which is good enough. No more language pop-up :)


Please do not use the locale. Use the OS language instead.

Reason: Some people will have set their locale to a language different than their OS language. I create installers for translation patches of Japanese games, and these games often require a Japanese locale to run properly. But this doesn't mean the user actually wants to see the installer suddenly switching to Japanese...


Thank you MSG,

Here is my code. Does it use the locale or the language? I have no idea.


!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
LangString CONFIRM_MSG ${LANG_ENGLISH} "Blah, blah, blah. Continue?"
LangString CONFIRM_MSG ${LANG_FRENCH} "Blah, blah, blah. Voulez-vous continuer?"
Function un.onInit

MessageBox MB_YESNO "$(CONFIRM_MSG)" IDYES NoAbort
Abort
NoAbort:

FunctionEnd

I dunno, I never use more than one language in my installers, but I seem to recall reading somewhere that NSIS uses OS language by default. But you can probably test it simply by setting your locale to something other than French. :)


Thanks MSG,

It's not worth the trouble. This is an internal software installer. We won't lose any customers over the language issue :)

Cheers,

Corneliu