Hi everyone,
I am trying to change NSIS dialog language after .oninit and not sure if this is possible at all.
I found some posting which are really old saying that after .oninit language cannot be changed.
I was wondering if this feature has been added to NSIS lately.
Is there any way to reload NSIS Dialogs with another $LANGUAGE after .oninit?
Thanks in advance!
Reset/Change $LANGUAGE after .oninit
14 posts
No, it is still not possible.
Is there any reason why this should be added as feature?
Once user selects the language (e.g. Slovak in my case) you want to switch it to another language (e.g. ENglish) ?
But Why?
Once user selects the language (e.g. Slovak in my case) you want to switch it to another language (e.g. ENglish) ?
But Why?
I saw this feature to change the language to Piriform CCleaner installer
Did you actually try it? If you do you will see that they re-launch the installer. For example, if I choose to switch to Swedish it starts itself again as '"c:\whatever\ccsetup516.exe" /L=1053'...Originally Posted by Coby View PostI saw this feature to change the language to Piriform CCleaner installer
Nice 🙂Originally Posted by Anders View PostDid you actually try it? If you do you will see that they re-launch the installer. For example, if I choose to switch to Swedish it starts itself again as '"c:\whatever\ccsetup516.exe" /L=1053'...
@Coby: This is a way how to do it without any change in sources.
Restarting was the only way to change the language, but I want to change that behavior.
Does anyone know where in the sources we can change this?
Has anyone accomplished this or requested this feature before?
Please let me know.
Many thanks!
Does anyone know where in the sources we can change this?
Has anyone accomplished this or requested this feature before?
Please let me know.
Many thanks!
You would have to call set_language() every time $language is changed or add a separate instruction. If it actually works or not is another question, I have personally never tried it.
Is set_language() a valid NSIS script function?
Would it be something like this:
!macro SetLanguage sLanguage
StrCpy $LANGUAGE ${sLanguage}
Call set_language
!macroend
Or set_language is actually a C++ call, so I would have to change NSIS C++ source, recompile and etc.
Thanks
Would it be something like this:
!macro SetLanguage sLanguage
StrCpy $LANGUAGE ${sLanguage}
Call set_language
!macroend
Or set_language is actually a C++ call, so I would have to change NSIS C++ source, recompile and etc.
Thanks
Yes it is a C function in the source. Obviously if there was a NSIS instruction for this we would have just told you at the start of the thread.
To solve this problem, now you can change the language after .onInit
Update.
Now you can change the color of the window
Now you can change the color of the window
Kuppy/Coby/Adryan/catssoft, why does your sample include the/my MoveAnywhere plug-in and regional windows? It has nothing to do with the question. Please only provide code to solve the question, adding other code that is unrelated to the problem only complicates things. I have given you so many warnings already and will ban your new account if you don't start listening...Originally Posted by Kuppy View PostTo solve this problem, now you can change the language after .onInit
I've seen this on HM NIS Edit script generator.
This is the code in question:
This is the code in question:
But in the language chooser form are summoned on this code:; Language files
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "SpanishInternational"
Maybe another extra macro can solve this issue.Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd