Old 2nd July 2012, 15:30   #1
crisader
Junior Member
 
Join Date: Apr 2012
Posts: 10
LangString for all Languages

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?
crisader is offline   Reply With Quote
Old 2nd July 2012, 18:19   #2
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 462
The only strings that get translated are identified with $(^...). If you just say "foo bar" it will be "foo bar" for any language.
demiller9 is offline   Reply With Quote
Old 2nd July 2012, 20:45   #3
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
why not simple use !define for that?
Yathosho is offline   Reply With Quote
Old 9th July 2012, 09:45   #4
crisader
Junior Member
 
Join Date: Apr 2012
Posts: 10
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.
crisader is offline   Reply With Quote
Old 9th July 2012, 11:03   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You need to use ${MUI_TEXT_LICENSE_TITLE} if you use !define MUI_TEXT_LICENSE_TITLE.

Stu
Afrow UK is offline   Reply With Quote
Old 9th July 2012, 12:22   #6
crisader
Junior Member
 
Join Date: Apr 2012
Posts: 10
!define ${MUI_TEXT_LICENSE_TITLE} "foo bar"
gets ignored again.
crisader is offline   Reply With Quote
Old 9th July 2012, 15:15   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I think you need to look at the manual.

!define MyConstant "my value"
...
DetailPrint "${MyConstant}"

Stu
Afrow UK is offline   Reply With Quote
Old 13th July 2012, 08:41   #8
crisader
Junior Member
 
Join Date: Apr 2012
Posts: 10
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"
crisader is offline   Reply With Quote
Old 13th July 2012, 10:46   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Yes that was for the usage obviously. So you have defined MUI_TEXT_LICENSE_TITLE; where have you used ${MUI_TEXT_LICENSE_TITLE}?

Stu
Afrow UK is offline   Reply With Quote
Old 13th July 2012, 12:02   #10
crisader
Junior Member
 
Join Date: Apr 2012
Posts: 10
!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"
crisader is offline   Reply With Quote
Old 13th July 2012, 19:19   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 18th July 2012, 12:19   #12
crisader
Junior Member
 
Join Date: Apr 2012
Posts: 10
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
crisader is offline   Reply With Quote
Old 18th July 2012, 14:39   #13
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
That's because the language strings still have the same name whereas the defines do not.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump