Hey,
I use LangString to set the Strings of the MUI-Dialogs like so :
LangString MUI_TEXT_INSTALLING_TITLE ${LANG_ENGLISH} "foo bar"
But I want these String displayed regardless of the Localization of the Execution Environment, so that it says "foo bar" even on chinese or whatever systems, without defining the same String for every language?
Any simple solution?
LangString for all Languages
13 posts
The only strings that get translated are identified with $(^...). If you just say "foo bar" it will be "foo bar" for any language.
why not simple use !define for that?
Neither works for me:
!define MUI_TEXT_LICENSE_TITLE "bla"
just ignores the define and no title is displayed
LangString MUI_TEXT_LICENSE_TITLE "bla"
displays the error "LangString expects 3 parameters, got 2." at compile-time.
!define MUI_TEXT_LICENSE_TITLE "bla"
just ignores the define and no title is displayed
LangString MUI_TEXT_LICENSE_TITLE "bla"
displays the error "LangString expects 3 parameters, got 2." at compile-time.
You need to use ${MUI_TEXT_LICENSE_TITLE} if you use !define MUI_TEXT_LICENSE_TITLE.
Stu
Stu
!define ${MUI_TEXT_LICENSE_TITLE} "foo bar"
gets ignored again.
gets ignored again.
I think you need to look at the manual.
!define MyConstant "my value"
...
DetailPrint "${MyConstant}"
Stu
!define MyConstant "my value"
...
DetailPrint "${MyConstant}"
Stu
Can you explain why you used DetailPrint?
Or was that just for the usage?
Anyway as I said I used
!define MUI_TEXT_LICENSE_TITLE "bla"
Or was that just for the usage?
Anyway as I said I used
!define MUI_TEXT_LICENSE_TITLE "bla"
Yes that was for the usage obviously. So you have defined MUI_TEXT_LICENSE_TITLE; where have you used ${MUI_TEXT_LICENSE_TITLE}?
Stu
Stu
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_UNPAGE_WELCOME
!define MUI_TEXT_LICENSE_TITLE "x"
!define MUI_INNERTEXT_LICENSE_TOP "x"
!define MUI_INNERTEXT_LICENSE_BOTTOM "y"
!define MUI_TEXT_LICENSE_SUBTITLE "x"
!insertmacro MUI_PAGE_LICENSE "bla.txt"
!insertmacro MUI_UNPAGE_WELCOME
!define MUI_TEXT_LICENSE_TITLE "x"
!define MUI_INNERTEXT_LICENSE_TOP "x"
!define MUI_INNERTEXT_LICENSE_BOTTOM "y"
!define MUI_TEXT_LICENSE_SUBTITLE "x"
!insertmacro MUI_PAGE_LICENSE "bla.txt"
You would have saved some time by looking at the MUI/MUI2 docs. MUI_TEXT_LICENSE_TITLE is not valid. In fact, none of those defines are. They look like the defines MUI 1.0 used around the NSIS 2.0b/2.1 era.
Stu
Stu
Thanks it finally works now.
Although I find it rather strange that the MUI 1.0 constants work with MUI 2 as long as you use LangString instead of !define
Although I find it rather strange that the MUI 1.0 constants work with MUI 2 as long as you use LangString instead of !define
That's because the language strings still have the same name whereas the defines do not.
Stu
Stu