Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   How to force to a certain language (http://forums.winamp.com/showthread.php?t=320795)

Oogst 14th July 2010 08:28

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.

th_mi 14th July 2010 12:50

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


Animaether 14th July 2010 12:56

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

Oogst 14th July 2010 13:24

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!

Wizou 14th July 2010 16:57

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

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

and no other LoadLanguageFile...


All times are GMT. The time now is 17:33.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.