Old 24th August 2012, 10:30   #1
SirHally
Junior Member
 
Join Date: Aug 2012
Posts: 2
Lightbulb NSIS works with LangString incorrectly

I have an installer, it builds automatically (on TFS) by using NSIS command line features

code:
"..\..\NSIS\makensis.exe" /DBUILD_NUMBER=28311 /DPRODUCT_LANGUAGE=English "MTService_setup.nsi"


The installer must use only one language, which specified in PRODUCT_LANGUAGE parameter. I've done it in the following way

code:
!insertmacro MUI_LANGUAGE "${PRODUCT_LANGUAGE}"


When I build installer in such way, the common language of the interface is correct. But it uses default system language for LangString. So, if default system language is not English, it shows LangString on another language in the English installer.

I've tried to change script to avoid command line parameters (for test purposes)

code:
!insertmacro MUI_LANGUAGE "English"


It doesn't work too.

I've tried to change script to

code:

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Russian"

Function .onInit

!insertmacro MUI_LANGDLL_DISPLAY

FunctionEnd



It works, but, of course, it shows language selection dialog. I want to use specific ${PRODUCT_LANGUAGE} without any dialog.

So, how can I fix it?
SirHally is offline   Reply With Quote
Old 24th August 2012, 10:48   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Try http://nsis.sourceforge.net/Language...ws_UI_Language.

Stu
Afrow UK is offline   Reply With Quote
Old 24th August 2012, 11:26   #3
SirHally
Junior Member
 
Join Date: Aug 2012
Posts: 2
Unfortunatelly, it doesn't work for me. There wasn't any changes, LangString use system default language.



I've tried to add

code:

StrCpy $LANGUAGE ${LANG_ENGLISH}



in .onInit function, but it doesn't work too
SirHally is offline   Reply With Quote
Old 24th August 2012, 12:55   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Something is wrong with your script. Half of those texts are LangStrings. The rest are set via the old language file format (nlf) but are still selected on the value of $LANGUAGE. Is it just the section descriptions? Where have you put your language strings for those? Are they after !insertmacro MUI_LANGUAGE ...?

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

Tags
langstring, localization

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