Archive: Product name issues in a multilingual installer


Product name issues in a multilingual installer
Hi,

I hope a cure can be found to the following maladies that inflict my multilingual NSIS installer:

I've resumed work on the NSIS Modern UI installer for my multilingual application. This application will be marketed under a different name in several countries. I want to leverage the existing NSIS Modern UI language files which use ${MUI_PRODUCT} extensively.
So variable MUI_PRODUCT should differ per language. Is there support for this in NSIS?
I tried to define it before each insertmacro which loads the strings of each language (the same way this is done for MUI_BRANDINGTEXT, for example), but received a compilation error that it's already defined. Any advice on tackling this problem would be appreciated.

I hit another snag while working on the multilingual installer. I am trying to define a multilingual string (i.e. a LangString) that refers to another previously defined multilingual string.
Let's say I have:
LangString MUI_PRODUCT_LOC ${LANG_ENGLISH} "English app name"
LangString MUI_PRODUCT_LOC ${LANG_FRENCH} "French app name"
etc. etc.

And now I want to use MUI_PRODUCT_LOC within another LangString definition. For example:

LangString AppIsRunningMessage ${LANG_ENGLISH} "$(MUI_PRODUCT_LOC) is currently running.$\r$\n$\r$\nPlease close it so it that it may be safely upgraded$\r$\nand click OK to proceed, or click Cancel to abort"

Unfortunately, the above doesn't work!! The message, when displayed, is completely empty. Trying to do something similar in an uninstaller message (LangString Un.AppIsRunningMessage with similar content) gives a compiler warning this time:

Uninstaller language strings must start with un. ($(MUI_PRODUCT_LOC) is currently running.

What can be done about this? Being able to use a LangString inside another seems important.

Finally, the following doesn't work:

Caption /LANG=${LANG_ENGLISH} "$(MUI_PRODUCT_LOC) V${MUI_VERSION} Setup"

This enhances the look of the installation captions by adding a "V" before the version number, e.g. "My App V1.0.2" instead of "My App 1.0.2". This "V" is not put inside MUI_VERSION itself because it's also a multilingual issue and for some languages it may need to be replaced with another initial. The above code compiles OK but when the installer is run, all captions are empty. Note: MUI_PRODUCT_LOC is a LangString defined previously for each language, including English.

My gratitude is extended to anyone who can help out with these issues.

Thanks,
G J


LangStrings can be used in any other strings yet. You'll have to create a seperate LangString for every string you wish to translate.

To change the catption define MUI_NAME before each language file.