Archive: language issue


language issue
Hi all,

I have in my script:
===========================
- languages needed
; Language files
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
- the diff translation for a string:
LangString MsgBoxMessage ${LANG_ENGLISH} "Are you sure?"
LangString MsgBoxMessage ${LANG_GERMAN} "Bist du sicher?"
- the needed registry entries to save the seleceted language
; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
- the needed code so that the uninstaller uses the same language chosen when installing
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd

Problem:
=========
If I put the following line:
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(MsgBoxMessage)" IDYES +2
into Section Uninstall the correct one (language) is shown for the message box. But if I put the same line in the un.onInit (after the !insertmacro MUI_UNGETLANGUAGE) it's not working. It's always shown in english.

Can somebody please tell me what am I doing wrong?

Thanks,
Viv


Your change of $LANGUAGE only takes effect after .onInit returns. Search the forum for ".oninit langstring" for more information.

http://forums.winamp.com/showthread....String+.oninit
http://forums.winamp.com/showthread....String+.oninit
http://forums.winamp.com/showthread....String+.oninit


Got it, thx,

Viv