Archive: detect default language in ModernUI 1.61


detect default language in ModernUI 1.61
Hello?

How can i detect default language in ModernUI 1.61?

in NSIS Document,

!insertmacro MUI_LANGUAGE "English"

this form.

I want detect default language in runtime and show that language form in modernUI 1.61.


TIA :)


- dirtybit


I don't quite understand what you mean. If you are talking about the language the user has chosen use $LANGUAGE. If you are talking about the language that will be selected by default in the LangDLL dialog then it's the first one included in the script. I hope this helps.


Thanks for your answer, and sorry for my poor english :)

I mean, if I use modernUI i must call MUI_LANGUAGE macro.

but MUI_LANGUAGE macro only accept language name(I.E. English, Japanese, Korean, and so on)

i saw $LANGUAGE has only number code.

so, how can I find default language name in string(English, Japanese, Korean...) to call MUI_LANGUAGE?

or is there other way?

TIA :)

- dirtybit


Where do you get the numbers from? If you want to get the number for a specific language use Bin\MakeLangID.exe. If it's a language that already exists open up its .NLF file and look at the first line. I hope that helps a bit more...

If you want to do it at runtime you'll have to compare ${LANG_*} to the number you have. ${LANG_ENGLISH} for example, contains 1033.