Archive: [MUI] Multilingual custom page


[MUI] Multilingual custom page
Hi,

I'm using MUI for creating multi-lingual installation files. After the license page (license generally in English) and just before the directory page, I want to display some text in the appropriate language.

!insertmacro MUI_PAGE_LICENSE "license.txt"
Page custom InfoBefore
!insertmacro MUI_PAGE_DIRECTORY

I'm trying to adapt the the example "MultiLanguage.nsi", but I'm not sure how to achieve this. I don't know how to combine the language selection with the choice of the appropriate ini file. Or are there simpler possibilities?

I'm trying this:

LangString TEXT_INFO_BEFORE ${LANG_ENGLISH} "ioA_en.ini"
LangString TEXT_INFO_BEFORE ${LANG_GERMAN} "ioA_de.ini"

!insertmacro MUI_INSTALLOPTIONS_EXTRACT "$(TEXT_INFO_BEFORE)"

This doesn't work: File: "$(TEXT_INFO_BEFORE)" -> no files found.

Thank you.


Stefan


You can't do it like that. LangStrings are run time. The installer can't compress a file at compile time with a name that will be set at run time. This is a logical impossibility :)

You should extract the same InstallOptions INI file, but write the language strings to the fields with MUI_INSTALLOPTIONS_WRITE before showing the page.

-Stu


hi, sorry to ask this, but I have the same problem. Do you mean that MUI_INSTALLOPTIONS_WRITE could overwrite the texts from the ini?