Skip to content
⌘ NSIS Forum Archive

setting language by command line option

3 posts

rio#

setting language by command line option

Hi all,

How can I set the language to a value I get from the command line?
(catching command line parameter is not the problem)
In the example I try to set $LANGUAGE to Frech, but this doesn´t work
😢
Can anybody give me a hint?

Thanks
rio

OutFile        "install.exe"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
Name English
LoadLanguageFile "${NSISDIR}\Contrib\Language files\French.nlf"
Name French
LoadLanguageFile "${NSISDIR}\Contrib\Language files\German.nlf"
Name German
LangString Message_01 ${LANG_ENGLISH} "eng"
LangString Message_01 ${LANG_FRENCH} "fr"
LangString Message_01 ${LANG_GERMAN} "ger"
Function .onInit
StrCpy $LANGUAGE "French" 
;HOW CAN I DO THIS
FunctionEnd
Section "" ; (default section)
MessageBox MB_OK $(Message_01)
quit
SectionEnd 
kichik#
You should set $LANGUAGE to ${LANG_*}, not the name of the language. ${LANG_*} defines contain the language id which is what $LANGUAGE should contain.