Archive: bug with MUI + multilanguage in 1.66


bug with MUI + multilanguage in 1.66
  i've loaded the last nightly build and I have the following problem with my script witch is using MUI and multilanguage.

After the selection of the language it shows the screens corectly BUT not the options page and if i put a messagebox with a string in it $(LANG_TEST) it apears always in one of the languages.

This was working in older versions.

PS. Did I mention:
- i've made tests only for updated languages (1.66 and V6)
- I've found a problem that could be related to this: if you try to define strings for languages not defined at the begening it doesn't snow any error (ok for me), BUT it's overwriting the first language translation with the translation of the undefined language. (this is very bad!!!) You can discover this problem evem with the multilanguage MUI example.


I'm desperate, I need to release my kit and now I'm stuck with this stupid bug. The most simple way to test it's presence is putting a message box after the language selection macro. You'll see that it uses the system default language instead of the selected one. (also the interface is using the selected language but not the $(variable)


Can you please attach screenshots & scripts? I don't really understand your problems.


here it's the test file.
Run it and select last language (German). It will show you english translated text instead of german even if the dialogs are corectly snown. For the other two it wokrs. The problem can be easely reproduced. I've made this special for you from the defaulte example.

I don't think you'll need screenshots :)


That's because the langauge has not yet been set in .onInit (.onInit is used to modify the langauge). Put your messagebox in a custom GUIINIT function (see Modern UI Readme) and it will work.


Sorry, but I don't understand how the *new systems* works because for be It would be logically that after the closing of the language selector dialog I'll have access to the translated texts. In my real installer I have a lot of operations in the .oninit function and many of them requires to use translated texts.

This is now:


onInit

!insertmacro MUI_LANGDLL_DISPLAY
MessageBox MB_OK "$LANGUAGE $(DESC_SecDummy)"
>FunctionEnd
>
How should this look in 1.66 and later ? If you try the $LANGUAGE is containing the right language BUT the other variable is not working.

It has always been this way, use GUIINIT to have access to the strings.


Ok, thy wat works, BUT please can you update the Examples\Modern UI\MultiLanguage.nsi file! It's old and it doen't work as it should.
It contains a bad example.


MultiLanguage.nsi is a good example. The only thing is that some language files have not been updated yet, that's why it doesn't compile.

We'll wait a little longer before we release beta 4. If these languages still have not been updated yet by then, they will be removed.


Can you please include a comment about this problem in the example. Like this:
; Do not use language demendent strings in .onininit use ....instead. Or even an example, so others will know what to do and will not make my mistake.

Thanks,