Skip to content
⌘ NSIS Forum Archive

Best approach to select text messages based on System default language

3 posts

ranu_hai#

Best approach to select text messages based on System default language

Which is a best approach from the following to "Display the text messages based on system default language "

1 ) use LangString to display the text
LangString MsgBoxText ${LANG_ENGLISH} "English text .. "
LangString MsgBoxText ${LANG_ENGLISH} "Japanese text..."

...
MessageBox MB_OKCANCEL|MB_ICONQUESTION $(MsgBoxText) IDOK +2 Abort


2) use windows api and get the system default language id and then set to $LANGUAGE

GetSystemDefaultLangID
kichik#
The first method is obviously simpler and it even contains the second method. If you want to use the second method to determine the language, there is no need to do so for every message box. You can simply set $LANGUAGE in .onInit according to GetSystemDefaultLangID.