Archive: How to force to a certain language


How to force to a certain language
I would like to force my installer to always be in German, regardless of the Windows language and such. What do I need to do to make all the standard interface elements German? I thought just adding this to the top of my installer script would fix it:

Function .onInit
StrCpy $LANGUAGE "1031"
FunctionEnd

However, the NSIS script compiler considers this okay, but my installer is still in English. What am I doing wrong here?

By the way, I found the value "1031" for German here. I also tried using the hex value given there: $0407.


You did not pass any code to find out the problem you have, Have you tried it this way:

;--------------------------------

OutFile languages.exe
XPStyle on
RequestExecutionLevel user

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


;--------------------------------
Section ""

SectionEnd

;--------------------------------
Function .onInit
;english
;StrCpy $LANGUAGE 1031

;german
StrCpy $LANGUAGE 1033
FunctionEnd

if you're using MUI2, you can also use..

!insertmacro MUI_LANGUAGE "German"

..and call it a day - no need to touch the language bits yourself; it pretty much does what th_mi explained under the hood

Ah, that was easy! I did have to combine it with an include, but that was it:

!include "MUI2.nsh"
!insertmacro MUI_LANGUAGE "German"


Awesomesauce, thanks for the quick help!

if you don't want MUI or MUI2, just do a

LoadLanguageFile"${NSISDIR}\Contrib\Languagefiles\German.nlf"

and no other LoadLanguageFile...