Archive: Polish characters not displayed in MessageBox


Polish characters not displayed in MessageBox
Hi,

I am NSIS newbie. I am facing a problem with the NSIS un-installer. When i install my software using NSIS i give the option to the user to select from 2 languages : English and Polish. Once it is installed by setting the Polish language and then on un-installing the software i need the prompts and messages to come up in Polish. I use the MessageBox in un.oninit method to get confirmation from the user whether he wants to go ahead with the un-installation. But the MessageBox text does display the Polish characters properly if i hardcode the text string in the MessageBox method call or by using the LangString feature. I have changed the default language of my PC to Polish, still it does not display properly.

Secondly, the 'Yes' and 'No' buttons in the MessageBox do not show up in Polish. Is it possible to show it in the same language as that of the OS.

The second approach i tried is to replace the existing text in Polish.nlf and use those strings in the MessageBox. But here again it happens that irrespective of the default OS language these text strings are picked up from English.nlf. Is there are way to indicate to un-installer that if the default language of the OS is polish then pick up text strings from Polish.nlf and if English then from English.nlf.

This is my code :

!include "MUI2.nsh"
var Lang_Installer

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Polish"

Function un.onInit

Call un.IsSilent
Pop $0
StrCpy $IsSilentInstall $0
ReadRegStr $Lang_Installer HKLM Software\Comp\Installer\AppData Language
${If} $Lang_Installer == 'pl'
StrCpy $Language ${POLISH}
MessageBox MB_YESNO $(^ComponentsSubCaption) /SD IDYES IDYES NoAbort
${Else}
StrCpy $Language ${ENGLISH}
MessageBox MB_YESNO "@ssm.uninstaller.confirmation.text.en@" /SD IDYES IDYES NoAbort
${EndIf}

Abort ; causes uninstaller to quit.
NoAbort:
FunctionEnd

Would really appreciate an early reply.

Thanks,
Smita.


http://forums.winamp.com/showthread.php?t=301723
http://forums.winamp.com/showthread.php?t=246723

Stu