Archive: MUI language strings in latest development snapshot


MUI language strings in latest development snapshot
  Is it possible to define multi-language strings for MUI strings such as MUI_INNERTEXT_LICENSE_TOP, MUI_INNERTEXT_LICENSE_BOTTOM which aren't detailed in the latest MUI snapshot documentation.


You should be able to by using the 'LangString' command.

Vytautas


Using LangString seems to work however when I declare a language string such as,

LangString MUI_TEXT_WELCOME_INFO_TEXT "${LANG_JAPANESE}" "Japanese Welcome Text" 

I get the following warning message.
LangString"MUI_INNERTEXT_LICENSE_TOP" set multiple times for 1033, wasting space (macro:LANG_STRING:1) 

It works and as long as there's no ill side effects I'm fine with this.

I believe that this warning message is produced if the LangString command is in the wrong place. (I think that you have to define the Language string before you insert that particular page to prevent the warning from displaying, though I could be wrong, kichik or joost will know for sure.

Vytautas


That's not true. Please check the Readme, all settings are there (such as MUI_LICENSEPAGE_TEXT_TOP)

LangString MYTEXT ${LANG_ENGLISH} "English text"
LangString MYTEXT ${LANG_GERMAN} "German text"

!define MUI_LICENSEPAGE_TEXT_TOP "$(MYTEXT)"

!insertmacro MUI_PAGE_LICENSE

Yes MUI_LICENSEPAGE_TEXT_TOP is there but MUI_INNERTEXT_LICENSE_TOP is not.


MUI_INNERTEXT_LICENSE_TOP is a langauge file string.

To change this text, use the MUI_LICENSEPAGE_TEXT_TOP setting.

This is the same text (top text of license page, not the header text).


How about MUI_INNERTEXT_LICENSE_BOTTOM? I can't modify it without getting compiler errors saying it's already defined.


After some investigation I was able to modify MUI_LICENSEPAGE_TEXT_BOTTOM by switching this section in System.nsh for the Modern UI....

!macro MUI_FUNCTION_LICENSEPAGE PRE SHOW LEAVE


Function "${PRE}"

!insertmacro MUI_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_LICENSE_SUBTITLE)

FunctionEnd

Function "${SHOW}"

!ifndef MUI_LICENSEPAGE_TEXT_TOP
!insertmacro MUI_INNERDIALOG_TEXT 1040 $(MUI_INNERTEXT_LICENSE_TOP)
!else
!insertmacro MUI_INNERDIALOG_TEXT 1040 "${MUI_LICENSEPAGE_TEXT_TOP}"
!undef MUI_LICENSEPAGE_TEXT_TOP
!endif

!insertmacro MUI_FUNCTION_CUSTOM SHOW

FunctionEnd

Function "${LEAVE}"

!insertmacro MUI_FUNCTION_CUSTOM LEAVE

FunctionEnd

>!macroend
>
to this.

macro MUI_FUNCTION_LICENSEPAGE PRE SHOW LEAVE


Function "${PRE}"

!insertmacro MUI_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_LICENSE_SUBTITLE)

FunctionEnd

Function "${SHOW}"

!ifndef MUI_LICENSEPAGE_TEXT_TOP
!insertmacro MUI_INNERDIALOG_TEXT 1040 $(MUI_INNERTEXT_LICENSE_TOP)
!else
!
insertmacro MUI_INNERDIALOG_TEXT 1040 "${MUI_LICENSEPAGE_TEXT_TOP}"
!undef MUI_LICENSEPAGE_TEXT_TOP
!endif

!ifndef MUI_LICENSEPAGE_TEXT_BOTTOM
!insertmacro MUI_INNERDIALOG_TEXT 1006 $(MUI_INNERTEXT_LICENSE_BOTTOM)
!else
!insertmacro MUI_INNERDIALOG_TEXT 1006 "${MUI_LICENSEPAGE_TEXT_BOTTOM}"
!undef MUI_LICENSEPAGE_TEXT_BOTTOM
!endif

!insertmacro MUI_FUNCTION_CUSTOM SHOW

FunctionEnd

Function "${LEAVE}"

!insertmacro MUI_FUNCTION_CUSTOM LEAVE

FunctionEnd

>!macroend
>
Then use it in your script like
!define MUI_LICENSEPAGE_TEXT_BOTTOM "My license page bottom text"

No need to modify any files, there is a normal setting available (see Readme).

!define MUI_LICENSEPAGE_TEXT '"My text for the license page"'


Originally posted by Joost Verburg
No need to modify any files, there is a normal setting available (see Readme).

!define MUI_LICENSEPAGE_TEXT '"My text for the license page"'
Ok that makes sense. However when I try to use,

'"My licensepage text"' 

It doesn't even show up on the license page. If I use
!define MUI_LICENSEPAGE_TEXT '"My license page text" "My license page button"' 
it works for the button text and thats it. "My license page text" appears nowhere on the license page.