LCID is picked up from wrong setting?

Dec 14, 2010 at 2:45 PM
Edited Dec 14, 2010 at 2:57 PM


I'm using a multi-language installer created from dotNetInstaller 2.0.However I noticed that the LCID setting used to create localized versions seems to be coming through incorrectly.

If I change the UI culture (in region & language - format) then this changes the language of the installer. If I change the language setting in the region & language - choose display language) then this doesn't effect the language of the installer.

Surely this should be the other way around for consistency with Windows?



Update: Just raised this in the issue tracker section. but can't delete this entry.

Dec 14, 2010 at 6:44 PM
Edited Dec 14, 2010 at 6:45 PM

Something is very confusing here. The UI culture is really the "UI culture", aka in which language you want the UI to appear. But then Windows has this concept of "display language", aka in which language the Windows UI appears. That's called MUI. Personally I have no idea what this really means in terms of implementation. I would imagine that the workitem is to support MUI and I am open to all suggestions about how/what to do here.

Renamed your workitem,, to "support MUI".

Dec 17, 2010 at 12:06 AM

If I test this in .Net the Windows settings behave as expected. CurrentUICulture is affected by the "Region & Language -  choose a display language" dialog (language), and the "Region & Language - Format" setting affects CurrentCulture (date/number formatting).

The issue seems to be that dotNetInstaller is currently using CurrentCulture rather than CurrentUICulture when choosing the configuration node (translations).

Dec 17, 2010 at 1:24 AM

.NET implementation an Win32 API implementation are two different beasts. If you (or someone reading this) can modify the C++ code to do the "right thing", I'll be glad to integrate it.

Dec 17, 2010 at 1:44 AM
Edited Dec 17, 2010 at 1:59 AM

My C++ is pretty poor.

I believe this is what you need to use.

Just had a quick look, something along the lines of the following in OSUtil.cpp


LCID DVLib::GetOperatingSystemLCID(LcidType lcidtype)
	case LcidSystem:
		return ::GetSystemDefaultUILanguage();
	case LcidUser:
		return ::GetUserDefaultUILanguage();
	case LcidUserExe:
		// see
		std::wstring userexepath = DVLib::DirectoryCombine(DVLib::GetSystemDirectoryW(), L"user.exe");
		DVLib::FileVersionInfo versioninfo = DVLib::GetFileVersionInfo(userexepath);
		return versioninfo.translation_info.wLanguage;


Dec 17, 2010 at 1:17 PM

Sounds good. Don't forget that you can't change existing behavior. So extend OsUtil behavior with 2 new enums, propagate them to configuration, etc. Also note though that GetUserDefaultUILanguage and GetSystemDefaultUILanguage return LANGIDs, not LCIDs. This means that you only have the language part, and not the region part. So this value probably needs to be combined with the current user/system region. Don't forget unit tests :)


Dec 17, 2010 at 8:51 PM

Sorry I didn't mean I could make the change, I just think this is along the lines of what's needed.

I'm a .Net guy, I can follow the code but my skills aren't really up to implementing a change like this. Any chance someone else can implement a fix? I'm using it on a project at the moment and could really do a fix.

Dec 19, 2010 at 2:58 PM

If yu promise to give a 100$ to your favorite charity, I'll do it early this week.

Dec 22, 2010 at 4:28 AM

Build 2.0.8977.0 has two new ways to specify the LCID (MuiUser and MuiSystem). Try it. Let me know if it works.

Dec 27, 2010 at 11:53 AM

Thanks, really appreciate it :)

Unfortunately I don't have the components installed to be able to build the project at the moment and test. I'll have to look at this when I'm back at work, or will need to wait for the next release.