Archive: Displaying the language selection dialog in the operating system's ui language


Displaying the language selection dialog in the operating system's ui language
Hi!
Since I'm utterly stuck and haven't found anything that applies, I decided to post this here in the hopes that someone might have a clue.
I have created a setup using the modern ui 2.
One of the first things I do in .onInit is:
!insertmacro MUI_LANGDLL_DISPLAY
to display a dialog in which the user can select the install language.
This dialog is always displayed in English. However, I have the requirement that it be displayed in the operating system's ui language if possible, and in English otherwise.
Could anyone please offer some advice?
Greetings from Germany,
Felix


Write an If/Else statement for the languages section which reads the registry for the default language, something like this

Function .oninit
Search Registry Key
Read/Parse string

${If} Registry string == sdfjlskdf
!insertmacro MUI_LANGUAGE "English"
${Else}
!insertmacro MUI_LANGUAGE "whatever else"
${endif}

FunctionEnd


Something like that.


Thank you for your reply!
I'm sorry that I may not have provided enough detail about my problem. There is a macro called MUI_LANGDLL_DISPLAY which displays a dialog that lets the user select the setup language. My question concerns the language of this dialog itself. I would like it to be displayed in the operating system's ui language.
The language selection dialog is the first thing a user will se when running my setup. So, this dialog should greet the user in her/his own language.
Greetings,
FelixG


Have anyone found a solution for this yet? (display the message in user operating system's language for the language selection dialog). Thanks!


It's simple. Put this code on script:

!define MUI_LANGDLL_WINDOWTITLE $(msgLangChoiceTitle)
!define MUI_LANGDLL_INFO $(msgLangChoice)
and define language strings:
LangString msgLangChoice ${LANG_ENGLISH} "English Text"
LangString msgLangChoice ${LANG_UKRAINIAN} "Ukrainian Text"

LangString msgLangChoiceTitle ${LANG_ENGLISH} "English Text"
LangString msgLangChoiceTitle ${LANG_UKRAINIAN} "Ukrainian Text"