bumpelwumpel
29th May 2008 21:19 UTC
Problem with MultiLanguage
Hi,
I have two languages for my Installer. For that I created 2 lnaguage fils. They are called "MyInstallerEnglish" and "MyInstallerGerman".
So the Language selection dialog do not apear. Only if I create a new page befor the MUI_PAGE_WELCOME. Then I can choose the language.
Can anybody help me?
bumpelwumpel
LoRd_MuldeR
29th May 2008 21:53 UTC
!include "MUI2.nsh"
Name "MultiLanguage Test"
OutFile "MultiLanguage.exe"
InstallDir "$LOCALAPPDATA\MultiLanguage Test"
;Remember Installer Language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\Modern UI Test"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;Pages
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
;Languages
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
;Reserve Files
!insertmacro MUI_RESERVEFILE_LANGDLL
;Install Sections
Section "Dummy Section" SecDummy
;ADD YOUR OWN FILES HERE...
SectionEnd
;Display Language Dialog
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
Joost Verburg
29th May 2008 22:24 UTC
You have added the settings to store the language preference in the registry, this is why the dialog is not shown. If you want the dialog to be displayed anyway (with the registry preference as default), define MUI_LANGDLL_ALWAYSSHOW.
LoRd_MuldeR
30th May 2008 00:31 UTC
Yes, I forgot that in my sample code. Without MUI_LANGDLL_ALWAYSSHOW, the language dialog will appear only the first time the installer is run. Then the selected language is stored in registry and the language dialog won't appear again. If you add MUI_LANGDLL_ALWAYSSHOW, the dialog will always be shown, but the stored language is marked by default.
bumpelwumpel
2nd June 2008 14:35 UTC
Ok, I have now changed the UI. Now I use the UMUI and this works great.