Old 14th July 2010, 08:28   #1
Oogst
Junior Member
 
Join Date: Jan 2010
Location: Netherlands
Posts: 4
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.
Oogst is offline   Reply With Quote
Old 14th July 2010, 12:50   #2
th_mi
Member
 
Join Date: Sep 2005
Location: Sitting next to my desk
Posts: 56
You did not pass any code to find out the problem you have, Have you tried it this way:

code:
;--------------------------------

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


This signature is currently on vacation!
th_mi is offline   Reply With Quote
Old 14th July 2010, 12:56   #3
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
if you're using MUI2, you can also use..
code:
!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
Animaether is offline   Reply With Quote
Old 14th July 2010, 13:24   #4
Oogst
Junior Member
 
Join Date: Jan 2010
Location: Netherlands
Posts: 4
Ah, that was easy! I did have to combine it with an include, but that was it:

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



Awesomesauce, thanks for the quick help!
Oogst is offline   Reply With Quote
Old 14th July 2010, 16:57   #5
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
if you don't want MUI or MUI2, just do a
PHP Code:
LoadLanguageFile "${NSISDIR}\Contrib\Language files\German.nlf" 
and no other LoadLanguageFile...
Wizou is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump