Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   silent install / multilanguage (http://forums.winamp.com/showthread.php?t=307504)

o_owd 19th June 2009 17:51

silent install / multilanguage
 
Hello,

I have to add silent install support to one of our intallers.
Our installer has multi language support.
How can I choose the language to install during a silent install ?
Maybe with an answer file ? But how ? The languages have IDs or should I check the name of the language ?

Thanks.

Afrow UK 20th June 2009 15:36

I don't think NSIS has a built in command line switch for specifying the language but it is straight forward to add one using GetParameters followed by GetOptions. For example:

code:

${If} ${Silent}
${GetParameters} $R0
${GetOptions} $R0 `/lang=` $LANGUAGE
${Else}
.. display language selection
${EndIf}



If you don't want to specify locale id's you could specify language names (i.e. /lang=English) and you'd then need to:
code:

${GetParameters} $R0
${GetOptions} $R0 `/lang=` $R0
${If} $R0 == `English`
StrCpy $LANGUAGE ${LANG_ENGLISH}
${ElseIf} $R0 == ...
...
${EndIf}



Stu

o_owd 20th June 2009 16:29

Thanks,
I will try it.


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.