Archive: change "License Agreement" to "Terms of Service"?


change "License Agreement" to "Terms of Service"?
Is there a way to change the License Agreement page type to use "Terms of Service" wording instead?


just have a look at the language files.


I changed English.nlf this way:

=====
# ^LicenseSubCaption
: Terms of Service
# ^AcceptBtn
I &accept the Terms of Service
# ^DontAcceptBtn
I &do not accept the Terms of Service
=====

But after compiling and running the attached script, the text just below the title bar says:

=====
License Agreement
Please review the license terms before installing Crunchy Frog.
[...]
I accept the Terms of Service
I do not accept the Terms of Service
=====

Why hasn't "License Agreement" changed to "Terms of Service"?

And where is the string that controls "Please review..."? (I found several, but they all continue with "If you accept..." and this one doesn't continue that way)


You are using the modern UI so I believe you need to make your changes to the English.nsh file under ..\Contrib\Modern UI\Language Files.


have a look at the nsis documentation and the mui readme, for a better way of customizing page texts.
there are defines for mui and settings for normal layout.
use them instead of editing language files. :)


Could you be more specific about where the information is?

I had already looked through the MUI Readme and Examples:
http://nsis.sourceforge.net/Contrib/....html#examples

I haven't seen an example that shows a clean separation between install logic and localization strings.


I'd add that it'd be great to cleanly separate NLF files from app-specific strings needing localization.


Looks like it's under: 3. Pages then Page Settings and then License Page Settings. I forgot all about those.


None of those settings allow for changing "License Agreement" to "Terms of Service".

I had already tried those.

Maybe there's a way of overriding the var settings done in the language files by loading a custom config file. I'm sure a localization team would prefer to work with this rather than hunting through a language file or a script.


found in the makensis.nsi
(around line 1005)

Section -post

; When Modern UI is installed:
; * Always install the English language file

File "..\Contrib\Modern UI\Language files\English.nsh "

...


so the easiest way is to create your own "english1.nsh" and link to it this way.

The NLF is loaded this way:

LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf "


it's similar to this method
http://forums.winamp.com/showthread....hreadid=185190

dpbluegreen - Have another look at the MUI ReadMe, it explains how to change the License page to meet your requirements without modifying any of the standard language files.

In the Basic.nsi script in the "Examples\Modern UI" folder, I added some MUI "defines" before the MUI_PAGE_LICENSE line:

!define MUI_PAGE_HEADER_TEXT          "Terms of Service"

!define MUI_PAGE_HEADER_SUBTEXT "Please review the terms of service before installing $(^NameDA)."

!define MUI_LICENSEPAGE_TEXT_TOP "Press Page Down to see the rest of the terms."

!define MUI_LICENSEPAGE_TEXT_BOTTOM "If you accept the terms of service, click the check box below. You must accept these terms to install $(^NameDA). $_CLICK"

!define MUI_LICENSEPAGE_CHECKBOX

!define MUI_LICENSEPAGE_CHECKBOX_TEXT "I &accept the terms of service"

!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
I don't know the words you want to use or if you want to use an "Agree" button, a checkbox or radio buttons so you may need to make some changes to this code. The MUI ReadMe describes how to make these changes.

Here is a screen shot showing the result of the code above.

Looks great. But how does one specify what language those strings belong to?


And btw, how does one specify the language for the MUI_PAGE_LICENSE macro?


Use language strings if you want to support more than one language. The MUI ReadMe explains how to do this.

Here is how the strings in my previous example could be modified to work in English, French and German:

!define MUI_PAGE_HEADER_TEXT           "$(TOS_HEADER_TEXT)"
!define MUI_PAGE_HEADER_SUBTEXT "$(TOS_HEADER_SUBTEXT)"

!define MUI_LICENSEPAGE_TEXT_TOP "$(TOS_TEXT_TOP)"
!define MUI_LICENSEPAGE_TEXT_BOTTOM "$(TOS_TEXT_BOTTOM)"

!define MUI_LICENSEPAGE_CHECKBOX

!define MUI_LICENSEPAGE_CHECKBOX_TEXT "$(TOS_CHECKBOX_TEXT)"

!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"

...
...

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"

...
...

LangString TOS_HEADER_TEXT ${LANG_ENGLISH} "Terms of Service"
LangString TOS_HEADER_SUBTEXT ${LANG_ENGLISH} "Please review the terms of service before installing $(^NameDA)."
(etc)

LangString TOS_HEADER_TEXT ${LANG_FRENCH} "(French) Terms of Service"
LangString TOS_HEADER_SUBTEXT ${LANG_FRENCH} "(French) Please review the terms of service before installing $(^NameDA)."
(etc)

LangString TOS_HEADER_TEXT ${LANG_GERMAN} "(German) Terms of Service"
LangString TOS_HEADER_SUBTEXT ${LANG_GERMAN} "(German) Please review the terms of service before installing $(^NameDA)."
(etc)
The MUI ReadMe explains how to handle language selection (using MUI_LANGDLL_DISPLAY etc)

That helps a lot. But the license text remains unlocalized.

And the compiler doesn't like this:

=====
...
!insertmacro MUI_PAGE_LICENSE "${SRC_DIR}\$(TOS_text_file)"

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"

LangString TOS_text_file ${LANG_ENGLISH} "TOS_English.txt"

LangString TOS_text_file ${LANG_FRENCH} "TOS_French.txt"
...
=====


The answer is in the MUI ReadMe:

"If you want a certain value (e.g. a text) to be language-specific, set a language string (using LangString) and define $(STRINGNAME) as value. Use a license language string (LicenseLangString) for the license text."

If you look at the NSIS User Manual's description of LicenseLangString you'll find this:

"Does the same as LangString only it loads the string from a text/RTF file and defines a special LangString that can be used only by LicenseData."

So to use separate language texts for the "terms of service" change the MUI_LICENSE line to:

!insertmacro MUI_PAGE_LICENSE "$(TOS_TEXT)"

and add some LicenseLangString lines like this (e.g. next to the LangString lines):

LicenseLangString TOS_TEXT ${LANG_ENGLISH} "English.txt"
LicenseLangString TOS_TEXT ${LANG_FRENCH} "French.txt"
LicenseLangString TOS_TEXT ${LANG_GERMAN} "German.txt"

If you read the documentation and look at the examples supplied with NSIS you'll find answers to many of your questions.