Archive: Problem with Languages


Problem with Languages
I have create a setup with two languages. I have set the "BrandingText" but, the Branding text has been displayed on one of the languages :weird: :igor:. I have this basic script:

!define VER_MAJOR majorversion
!define VER_MINOR minorversion
!define NAME "Name"

!verbose 3
!include "${NSISDIR}\Examples\WinMessages.nsh"
!include "${NSISDIR}\Examples\Modern UI\ModernUI.nsh"
!verbose 4

!define CURRENTPAGE $9

!define TEMP1 $R0
!define TEMP2 $R1

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

;General
Name /LANG=1033 "${NAME} ${VER_MAJOR}.${VER_MINOR}"
Name /LANG=1043 "${NAME} ${VER_MAJOR}.${VER_MINOR}"
OutFile "OutFile.exe"
SetCompressor bzip2
SetOverwrite on

Caption "Caption"
BrandingText "BrandingText"

;User interface
!insertmacro MUI_INTERFACE "modern2.exe" "adni18-installer-B.ico" "adni18-uninstall-B.ico" "modern.bmp" "smooth"


I use the newest NSIS (2.0a7) :up:

What script-language addition is the solve?


You should define BrandingText for each and every one of the languages. If you don't sepcify a language it will use the last used language, but it won't set it to all of the languages.

Therefore you should use:
BrandingText /LANG=1033 "BrandingText english"
BrandingText /LANG=1043 "BrandingText dutch"


You are using a very old version of the Modern UI.

Download a new snapshot at http://www.nsis.sf.net. It's way easier to create multilanguage installers using the new Modern UI.


/LANG=ALL would be very convenient for strings that aren't going to changed based on the language, such as things like the branding text.

-Scott


I agree with this. If you use BrandingText /LANG=ALL `AnyText` or if you don't specify a language, all languages should be changed.


Yeah, now that you put it that way, if you don't specify a language, all of them should change. Because as it stands, when you dont' specify the language, only the last one is changed, which is what you'd want for a single-language installer, which is technically all of the languages anyway. If that even made sense to anybody but me.

But, either way is fine with me. /LANG=ALL, or the other. :)

-Scott


Yeah, now that you put it that way, if you don't specify a language, all of them should change. Because as it stands, when you dont' specify the language, only the last one is changed, which is what you'd want for a single-language installer, which is technically all of the languages anyway.
Well, that wasn't the original idea. The orignial idea was LoadLanguageFile and then all of the strings for that language. That saves you the writing of /LANG=lang_id each and every time...

Then back to /LANG=ALL, to avoid having to have 20 BrandingText lines, and such.

-Scott


That feature is on the TODO list, but other things have priority now.


:up: Understandably so. :) Sounds great to me. Keep up the great work, guys.

-Scott