Old 19th November 2010, 16:05   #1
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 192
Missing language dialog

Hi!
I have a problem with the language dialog. It is not shown. I have the following define:
!define MUI_LANGDLL_ALWAYSSHOW
I also have inserted the macro MUI_LANGDLL_DISPLAY in the .onInit function like this:
!insertmacro MUI_LANGDLL_DISPLAY
But the language dialog is not shown. What can be the reason for this?
TrifonovS is offline   Reply With Quote
Old 19th November 2010, 20:29   #2
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 563
Did you included more then 1 language?
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"

I suppose, if there is only one defined dialog will not shown.
-Pawel
Pawel is offline   Reply With Quote
Old 22nd November 2010, 06:37   #3
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 192
I have added two languages like this:

; Language files
!insertmacro LANG_LOAD "English"
!insertmacro LANG_LOAD "German"

Additionally I have made two files with translation in English and German language. I'm quite sure that I have seen this to work. Now after several version of the product (which I install) I see that it doesn't work anymore.
TrifonovS is offline   Reply With Quote
Old 22nd November 2010, 08:09   #4
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 566
Send a message via ICQ to T.Slappy
I have the same problem, this is my code:

code:

; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Afrikaans"
!insertmacro MUI_LANGUAGE "Albanian"
!insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "Basque"
!insertmacro MUI_LANGUAGE "Belarusian"
!insertmacro MUI_LANGUAGE "Bosnian"
!insertmacro MUI_LANGUAGE "Breton"
!insertmacro MUI_LANGUAGE "Bulgarian"
!insertmacro MUI_LANGUAGE "Catalan"
!insertmacro MUI_LANGUAGE "Croatian"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Esperanto"
!insertmacro MUI_LANGUAGE "Estonian"
!insertmacro MUI_LANGUAGE "Farsi"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Galician"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Hebrew"
!insertmacro MUI_LANGUAGE "Hungarian"
!insertmacro MUI_LANGUAGE "Icelandic"
!insertmacro MUI_LANGUAGE "Indonesian"
!insertmacro MUI_LANGUAGE "Irish"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "Kurdish"
!insertmacro MUI_LANGUAGE "Latvian"
!insertmacro MUI_LANGUAGE "Lithuanian"
!insertmacro MUI_LANGUAGE "Luxembourgish"
!insertmacro MUI_LANGUAGE "Macedonian"
!insertmacro MUI_LANGUAGE "Malay"
!insertmacro MUI_LANGUAGE "Mongolian"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "NorwegianNynorsk"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Serbian"
!insertmacro MUI_LANGUAGE "SerbianLatin"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Slovenian"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "SpanishInternational"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Thai"
!insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "Uzbek"
!insertmacro MUI_LANGUAGE "Welsh"
!insertmacro MUI_RESERVEFILE_LANGDLL

; On initialization
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd



I tried both Venis and HM NIS Edit to generate code, I also wrote the code by myself but everytime I got the same result [see the attachment] - only few of inserted languages were accepted.

I assume that this is some feature (or just bug) where the compiler tries to optimise language tables and remove those ones which are not supported by Windows / and/ or Codepage.


To solve your problem TrifonovS:
Use MUI_LANGDLL_ALLLANGUAGES
that: Always show all available languages and don't filter according to their codepage.

But before compiling remove all languages you will not need from your NSIS\Contrib\Language files\ directory (but backup them if you wish to use them later).
Attached Thumbnails
Click image for larger version

Name:	lang.jpg
Views:	324
Size:	21.5 KB
ID:	47935  

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2022: www.visual-installer.com
or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 22nd November 2010, 17:41   #5
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 563
Take a look at example file in: \NSIS\Examples\Modern UI\MultiLanguage.nsi
It should work.
-Pawel
Pawel is offline   Reply With Quote
Old 23rd November 2010, 06:55   #6
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 566
Send a message via ICQ to T.Slappy
Quote:
Originally Posted by Pawel View Post
Take a look at example file in: \NSIS\Examples\Modern UI\MultiLanguage.nsi
It should work.
-Pawel
Thanks for reply, Pawel, but NO.
As I said - this is either bug or feature of compiler - both MUI and MUI2 do this.
I compiled the MultiLanguage.nsi example you mentioned and I got the same result. (I made fresh install of NSIS)

This is a Windows related problem I suppose because on other computer I have lightly modified MUI2 .nshs (verbose is set to higher level) and I get these warnings:

for the first language::
code:

!insertmacro: MUI_LANGUAGE
MUI_LANGDLL_LANGUAGES_CP 56565 (macro:MUI_LANGUAGE:1)
warning: !warning: MUI_LANGDLL_LANGUAGES_CP 56565 (macro:MUI_LANGUAGE:13)
warning: !warning: MUI_LANGDLL_LANGUAGES_CP (macro:MUI_LANGUAGE:18)
!insertmacro: end of MUI_LANGUAGE



For any other language::
code:

!insertmacro: MUI_LANGUAGE
MUI_LANGDLL_LANGUAGES_CP 56565 (macro:MUI_LANGUAGE:1)
warning: !warning: MUI_LANGDLL_LANGUAGES_CP 56565 (macro:MUI_LANGUAGE:13)
!insertmacro: end of MUI_LANGUAGE



When this warning occur that language is not shown in MUI_LANGDLL_DISPLAY window.

Probably this could be added to tracker as official bug (or feature )

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2022: www.visual-installer.com
or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com
T.Slappy 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