Archive: How to detect MUI Langdll Language Selection?


How to detect MUI Langdll Language Selection?
Hello:

Perhaps this is an easy and/or replied question, but I have searched in the forum and I can't find the answer.

I am building an application that uses the "multilanguage.nsi" script from NSIS MUI Readme for language to be selected by the installer's user.

The question is I wanted to translate manually some "messages" of the installer according to the selected language, but I don't know how to get which is the one the NSIS has selected by the related procedure.

Can anyone tell me where I can find that?

Thanks.


Use LangString as shown in Examples\languages.nsi.


OK. Thanks a lot


I have a similar problem in the same vein. I've already got my LangStrings working just fine. However, I want to detect the user's selection for a different reason. Based on the user's selected language, I want to be able to copy the appropriate translation for my application. So is there a way to find out which language the user chose from MUI_LANGDLL_DISPLAY?


Nevermind. I found a way.

After displaying the dialog, I write the selected language to the registry using the MUI_LANGDLL_SAVELANGUAGE macro. Then I read the value from the registry and compare that to the value for the language. I find that I'm going to have to run the example a couple of times to get the value for any language I plan on using from now on. But at least it's a start.