Archive: Wanted empty language strings


Wanted empty language strings
Because of the different grammar it make sometimes sense to have different Word orders. This can be done by:

DetailPrint "$\n*** $(Adding1) $(${SecName}_NAME)$(Adding2)..."

LangString Adding1 ${LANG_ENGLISH} ""
LangString Adding2 ${LANG_ENGLISH} "englishtext"
LangString Adding1 ${LANG_GERMAN} "germantext"
LangString Adding2 ${LANG_GERMAN} ""
But there are always the warnings
LangString "Adding1" is not set in language table of language English
LangString "Adding2" is not set in language table of language German
This warning is indeed usefull if you 'forget' to set a string but for these two strings above I want do disable it. Is it possible to do something like
LangString Adding1          ${LANG_ENGLISH} nothing
? Thank you in advance for your help.

Are you sure that is right and it's not just because your LangString's are before you include the languages?

Stu


Re: Wanted empty language strings
Hi!

Have a look at the following sample. I think it demonstrates, what you want:


!include "MUI.nsh"

!include "WordFunc.nsh"
!insertmacro WordReplace

;The file to write
OutFile "test.exe"

ShowInstDetails show

;Verwendete Pages
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "English"

!insertmacro MUI_RESERVEFILE_LANGDLL

Section

Var /GLOBAL "tmp"
; Handle white spaces
${WordReplace} "$(Adding1)Johny$(Adding2)" " " "" "{}*" $tmp
Detailprint "$tmp"
SectionEnd

Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd

LangString Adding1 ${LANG_GERMAN} "Prost "
LangString Adding2 ${LANG_GERMAN} " "
LangString Adding1 ${LANG_ENGLISH} " "
LangString Adding2 ${LANG_ENGLISH} ", cheers!"

; eof



If you set langstrings to "", NSIS thinks they are undefined. Just enter white spaces and everything's ok.

Cheers,
Bruno.

This is a workaround for my problem but I woukd prefer a way to say NSIS this string HAS TO be empty, maybe via another parameter then "", for example NULL.

Is there a function like that or can it be easily added?


Should I post a Feature Request (and if yes: where)?


http://nsis.sourceforge.net/Bug_Reports

Stu