o_cee
19th September 2002 18:25 UTC
Multilanguage error messages
Creating multilanguage installer. Problem is how to fix those MessageBox'es i have.
I thought this would work, but it didn't.
MessageBox MB_OK "${$LANGUAGE_ERRORCODE1}"
Is there any nice way of doing this? Maybe MessageBox /LANG= would be an idea to inplement?
o_cee
brainsucker
19th September 2002 18:58 UTC
StrCmp + macro
No direct way (as i know). Use StrCmp. For clear code use macros. Ex:
!macro LANG_MB LANGID OPTIONS TEXT
StrCmp $LANGUAGE ${LANGID} 0 +2
MessageBox ${OPTIONS} "${TEXT}"
!macroend
Use ex:
!insertmacro LANG_MB ${LANG_ENGLISH} MB_OK "Just english text"
!insertmacro LANG_MB ${LANG_RUSSIAN} MB_OK "Just russian text"
It's huge and stupid, but should work...
o_cee
20th September 2002 09:58 UTC
yepp, that should work.. i guess i'll have to do it that way at the moment.
but i ran into another strange thing today.
!define LANG_ENG 1033
!define 1033_CMPTXT "Check the components you want to install and uncheck the components you don't want to install. Click Next to continue."
ComponentText /LANG=${LANG_ENG} "${${LANG_ENG}_CMPTXT}"
This works as long as i don't use "${${LANG_ENG}_CMPTXT}", but "${1033_CMPTXT}". When i do it with LANG_ENG, it just displays $1033_CMPTXT as the text.
Bug, or am i missing something??
o_cee