Archive: Make InstallOptionsPage Multilangual


Make InstallOptionsPage Multilangual
I have multiple InstallOptionsPages from *.ini files. I want this page to be multilangual. So i did the following.

Create languagekeys:


LangString TEXT_OPTIONSPAGE1 ${LANG_ENGLISH} "The text on page 1."
LangString TEXT_OPTIONSPAGE1 ${LANG_DUTCH} "De tekst op pagina 1."
LangString TEXT_OPTIONSPAGE1 ${LANG_SPANISH} "The text on page 1. Spaans"
LangString TEXT_OPTIONSPAGE1 ${LANG_GERMAN} "The text on page 1. Deutsch"


Made a tranlatefunction:

Function "TranslateInstallOptions"
WriteIniStr $PLUGINSDIR\ioA.ini "Field 2" Text $(TEXT_OPTIONSPAGE1)
FunctionEnd


And call this function from .onInit

Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY

InitPluginsDir
File /oname=$PLUGINSDIR\ioA.ini "bin\ioA.ini"

Call TranslateInstallOptions

FunctionEnd


But everytime only the English text is Written to ioA.ini... Anyone knows why?

Languages are not initialised until after .onInit. Call your translation function in .onGUIInit (!define MUI_CUSTOMFUNCTION_GUIINIT MyOnGUIInit) or in the page show function.

Stu


Thanx, that did the trick