Archive: Missing language dialog


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?


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


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.


I have the same problem, this is my 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).

Take a look at example file in: \NSIS\Examples\Modern UI\MultiLanguage.nsi
It should work.
-Pawel


Originally posted by Pawel
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::

!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::

!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 :))