Archive: How to set the license file depending on the language


How to set the license file depending on the language
Hello,

how can I set the license file (RTF) in the license Dialog depending on the language chosen ?

Thanks.

BYe Defcon0.


Check the NSIS manual for LicenseData (4.8.1.26) and LicenseLangString (4.9.15.3).
CF


OK.
I've added

LicenseLangString license ${LANG_GERMAN} Lizenz.rtf
LicenseLangString license ${LANG_ENGLISH} Lizenz_eng.rtf
into the first 10 lines (after all the !define's).
And I've got one warning:

LicenseLangString "license" set multiple times for 0, wasting space (C:\Documents and Settings\Administrator\Desktop\Setup\Setup.nsi:18)

And the text isn't set to the right language :(
What am I doing wrong ?

It would help if you included the actual code that breaks.
Did you insert this after defining the multiple license files?

LicenseData $(license)

You should probably have a look at the languages.nsi example in the ${NSISDIR}\Examples folder.
CF

I read the languages.nsi but still no success
At first I forgot LicenseData $(license)
Now I have

LicenseLangString MyLicense ${LANG_GERMAN} "Lizenz.rtf"
LicenseLangString MyLicense ${LANG_ENGLISH} "Lizenz_eng.rtf"
LicenseData $(MyLicense)
after the !defines.
But what do I write instead of Lizenz.rtf here ?
!insertmacro MUI_PAGE_LICENSE "Lizenz.rtf"

That should be

!insertmacro MUI_PAGE_LICENSE $(MyLicense)
and the correct file will be picked based on the system language
CF

Mhm. Still doesn't work :(
I have:

LicenseLangString MyLicense ${LANG_ENGLISH} "Lizenz_eng.rtf"
LicenseLangString MyLicense ${LANG_GERMAN} "Lizenz.rtf"
LicenseData $(MyLicense)
!insertmacro MUI_PAGE_LICENSE $(MyLicense)
The warning:
2 warnings:
LicenseLangString "MyLicense" set multiple times for 0, wasting space (C:\Documents and Settings\Administrator\Desktop\Setup\Setup.nsi:40)
LangString "MyLicense" is not set in language table of language German

And when I pick English language it works and the English License Agreement is there and when I pick German the License Text field is empty.

Could you attach the script that you are using?
CF


Here's the file.
Thanks :)


LicenseLangString MyLicense ${LANG_ENGLISH} "Lizenz_eng.rtf"
LicenseLangString MyLicense ${LANG_GERMAN} "Lizenz.rtf"
these lines should be placed after those:
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
and the licenseData line should be removed as the MUI LICENSEPAGE macro will do it for ya.

... and you are missing !insertmacro MUI_RESERVEFILE_LANGDLL

Check also Check ${NSISDIR}\Examples\Modern UI\MultiLanguage.nsi".

CF


Mhm I didn't needed that line I think. It works with Comm@nder12s lines.

Thanks to all !