corneliu
19th July 2011 19:16 UTC
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
jpderuiter
19th July 2011 22:27 UTC
And create the Messagebox in un.onGUIInit
http://forums.winamp.com/showthread.php?t=147907
corneliu
20th July 2011 16:21 UTC
Thanks jpderuiter,
Way too complicated. I have settled for using the system locale which is good enough. No more language pop-up :)
MSG
20th July 2011 16:31 UTC
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...
corneliu
20th July 2011 16:50 UTC
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
MSG
20th July 2011 18:55 UTC
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. :)
corneliu
20th July 2011 20:14 UTC
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