Skip to content
⌘ NSIS Forum Archive

readout language and branch on it (strcmp)

5 posts

Brummelchen#

readout language and branch on it (strcmp)

how can i read out the language (depending on this script)
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


and to branch on it (StrCmp $. "bla" yes no)

i need some different text here:

!insertmacro MUI_HEADER_TEXT "Choose Shortcuts" "Choose the additional shortcuts to create for xyz."
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "shortcuts.ini"
kichik#
The language id is saved in $LANGUAGE after .onInit. After you load a language file using LoadLanguageFile (MUI_LANGUAGE does that) you can use ${LANG_name} as the language id to compare to. For example, the language id of English is ${LANG_ENGLISH}.
Brummelchen#
so i have to compare a number instead a name?

StrCmp $LANGUAGE "1033" yes no

or

StrCmp $LANGUAGE "English" yes no

?
kichik#
You have to compare to ${LANG_name}. You can also compare to the number, but ${LANG_ENGLISH} is just defined to 1033, so it's the same thing.
Brummelchen#
so that is the only one:

StrCmp $LANGUAGE ${LANG_ENGLISH} yes no

(to make it very easy to me)

thx