Archive: Multilingual Readme Text


Multilingual Readme Text
I'm probably pushing my luck but here goes!

I want to change the Readme text on the closing page in the MUI installer. Is it possible to get this to work in a multilingual installer using the LangString function?

As an example, I want the Readme text to be replaced with "Français" if I am in the French installer or "English" if I am in the English installer.

I've tried the following without success:

LangString MUI_FINISHPAGE_SHOWREADME_TEXTName ${LANG_ENGLISH} "English"
LangString MUI_FINISHPAGE_SHOWREADME_TEXTName ${LANG_FRENCH} "Français"

!define MUI_FINISHPAGE_SHOWREADME_TEXT "$(MUI_FINISHPAGE_SHOWREADME_TEXTName)"


Any recommendations?

Thanks!

Ian


I'm not sure how this is easily possible because the Page settings are !defined before you use the !insertmacro MUI_LANGUAGE (which sets up your languages).

The only way you can get around that I can think of is that you do this...

Var SHOWREADME_TEXT
!define MUI_FINISHPAGE_SHOWREADME_TEXT "$SHOWREADME_TEXT"
!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT "setLang"

!insertmacro MUI_LANGUAGE ...

LangString SHOWREADME_TEXT ${LANG_ENGLISH} "English"
LangString SHOWREADME_TEXT ${LANG_FRENCH} "Français"

Function .onInit
StrCpy $SHOWREADME_TEXT $(SHOWREADME_TEXT)
FunctionEnd


This should work, but there's probably a better way to do this...

-Stu

I'm not sure how this is easily possible because the Page settings are !defined before you use the !insertmacro MUI_LANGUAGE (which sets up your languages).
This is not a problem. Here are some extracts from one of my installer scripts:
!define MUI_WELCOMEPAGE_TITLE   "$(MY_WELCOME_TITLE)"
!define MUI_WELCOMEPAGE_TEXT "$(MY_WELCOME_TEXT)"

!insertmacro MUI_PAGE_WELCOME

...
...

!insertmacro MUI_LANGUAGE "English"

...
...

LangString MY_WELCOME_TITLE ${LANG_ENGLISH} "Welcome to the ..."
LangString MY_WELCOME_TEXT ${LANG_ENGLISH} "This utility will ..."

Ah right there you go :)
Put your LangString calls under the !insertmacro MUI_LANGUAGE ...

-Stu


Thanks guys!

Tried both methods... Second one worked!

Great stuff! :)

Ian


Did the same thing for Web text:

!define MUI_FINISHPAGE_LINK "$(MY_WEB_TEXT)"
...
...
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Français"
...
...
LangString MY_WEB_TEXT ${LANG_ENGLISH} "Visit us on the Web: http://www.mywebsite.com/"
LangString MY_WEB_TEXT ${LANG_FRENCH} "Visitez-nous sur le Web: http://www.monsiteweb.com/"


Works like a charm!!!

Thanks again!

Ian