Skip to content
⌘ NSIS Forum Archive

can nsisrun in differnt lang by detect os type

5 posts

hotice#

can nsisrun in differnt lang by detect os type

for example
it detect the os was windows English version
it shows English interface automaticly
or windows Chinese version
it shows Chinese interface automaticly
eferna1#
Hacked from Vim 6.0:

++++++++++++++
/* Could use LOCALE_SISO639LANGNAME, but it's not in Win95.
* LOCALE_SABBREVLANGNAME gives us three letters, like "enu", we use
* only the first two. */

GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME,
(LPTSTR)buf, 20);

+++++++++++++++

This put LOCALE_SABBREVLANGNAME in buf. ;-)
crish#
should be (no) problem

the lang dates as numbers are stored in the registry

with this u can make diff versions where the lang files are via include and switch lang function .oninit
nels#
I personally use the settings of the control panel which can be found in the registry.

ReadRegStr $1 HKCU "Control Panel\International" "Locale"
The problem is that it's not very "user-friendly". For example, if the language is french, $1 will contain "0000040C", "0000080C", "00000C0C", "0000100C" or "0000140C" depending on the local settings 🙁 .

Hope it will help

Nels