Archive: NSIS language


NSIS language
Hi all,
I need your help. I'm new to NSIS and I'm trying to create an installer for my company but I'm facing some problems with the language: my installer should have the user OS language (no language selection) but then I have to define my own strings/texts. For this I'm using LangString, but actually the strings are not loaded at all.

for instance I'm using:
...
!insertmacro MUI_LANGUAGE English
!insertmacro MUI_LANGUAGE Italian
...
LangString SelectCountryTitle ${LANG_ENGLISH} "Country selection"
LangString SelectCountryTitle ${LANG_ITALIAN} "Seleziona il tuo paese"
...

but actually the strings are never really loaded.

Where is the error? Could you help me?

thanks


Where are you using $(SelectCountryTitle)?

Stu


here:

!insertmacro MUI_HEADER_TEXT "$(SelectCountryTitle)" ""


You insert custom translations like this: $(SelectCountryTitle)

and it'll replace it with "Country selection" if English or "Seleziona il tuo paese" if Italian.


Originally posted by redxii
You insert custom translations like this: $(SelectCountryTitle)

and it'll replace it with "Country selection" if English or "Seleziona il tuo paese" if Italian.
yes that's correct, but it does not work. If the user has an OS in english, then "Country selection" shall be displayed, instead if it is in italian, "Seleziona il tuo paese" shall be dispayed, but actually I only see a blank space.
Furthermore in the console I see:

"LangString "SelectCountryTitle" set multiple times for 0, wasting space (language.nsi:9)
LangString "SelectCountryTitle" is not set in language table of language Italian"

ok I found out the problem: I'm using a language.nsi file and then I include it, but I was doing as a first statment.
I just moved the include after the language macros and it worked.
Thank you very much for your help.