Old 21st March 2005, 20:41   #1
Innov-art
Junior Member
 
Join Date: Mar 2005
Posts: 5
Question 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
Innov-art is offline   Reply With Quote
Old 22nd March 2005, 07:51   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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...
code:
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
Afrow UK is offline   Reply With Quote
Old 22nd March 2005, 10:41   #3
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
Quote:
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:
code:
!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 ..."

pengyou is offline   Reply With Quote
Old 22nd March 2005, 11:22   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Ah right there you go
Put your LangString calls under the !insertmacro MUI_LANGUAGE ...

-Stu
Afrow UK is offline   Reply With Quote
Old 22nd March 2005, 12:14   #5
Innov-art
Junior Member
 
Join Date: Mar 2005
Posts: 5
Thanks guys!

Tried both methods... Second one worked!

Great stuff!

Ian
Innov-art is offline   Reply With Quote
Old 22nd March 2005, 12:30   #6
Innov-art
Junior Member
 
Join Date: Mar 2005
Posts: 5
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
Innov-art is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump