Archive: troubles with MUI and multi languages


troubles with MUI and multi languages
  Sorry for my bad English. :(

I trying to use example NSIS\Examples\Modern UI\MultiLanguage.nsi - it's work well, but when I modify it...

1. I need to show lisence in different language. If I try

  LicenseLangString license${LANG_ENGLISH} Datalicense_EN.rtf

LicenseLangString license${LANG_RUSSIAN} Datalicense_RU.rtf
>
before

  !insertmacro MUI_PAGE_LICENSE $(license) 

then I receive error because ${LANG_ENGLISH} and ${LANG_RUSSIAN} is not defined yet.

If I move lines
 !insertmacro MUI_LANGUAGE "English" ;first language is the default language

!insertmacro MUI_LANGUAGE "Russian"
before
  LicenseLangString license${LANG_ENGLISH} Datalicense_EN.rtf

LicenseLangString license${LANG_RUSSIAN} Datalicense_RU.rtf
!insertmacro MUI_PAGE_LICENSE $(license)
I receive a lot of messages like this:

warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:4)
warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:5)
...
LangString "MUI_UNTEXT_CONFIRM_SUBTITLE" is not set in language table of language Russian
LangString "MUI_UNTEXT_CONFIRM_SUBTITLE" is not set in language table of language English


What I have to do to fix this problem?

I believe the correct order for inserting MUI elements is:

  1. Pages
  2. Languages
  3. Custom language strings

I presume that because MUI only loads strings if the page that they're used on is already inserted to cut down on installer size. So if you move your MUI_PAGE_* up above the languages, those messages should go away.

--Dan