MUI Language

The MUI language is an invented name for the language that is at least considered for selection by the MLLoadLibrary function for most values of its dwCrossCodePage argument. Before the SHLWAPI version 6.00 from Windows Vista, the MUI language is also what is returned by the MLGetUILanguage function.

On Windows 2000 and higher, the MUI language is just the user default UI language. Indeed, this identity of the concepts is cemented into the SHLWAPI version 6.00 from Windows Server 2003 and Windows Vista and higher, such that SHLWAPI simply calls the standard API function GetUserDefaultUILanguage. Builds of version 6.00 from Windows XP and Internet Explorer 6.0, and all earlier versions back to 5.00, check first whether they are running on Windows 2000 or higher and then whether GetUserDefaultUILanguage is available as an export from KERNEL32.

Simulation From Registry Settings

When these earlier builds execute on other operating systems, they make their own determination of the MUI language from the registry. The MUI language is assumed not to change during the current user’s session, and so this discovery is done just the once and is then remembered. If the following registry value

Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer
Value: LPKInstalled

has no more than 4 bytes of data at least one of which is non-zero, then a language pack is installed and the user’s language is expected from one or two other settings. The first is recognised only in version 5.50 and higher.

Key: HKEY_CURRENT_USER\Software\Microsoft\Shared
Value: OfficeUILanguage

For both, the first two bytes of data make the language ID. The function reads as many as 4 bytes, but does not insist on REG_DWORD data or check that at least two bytes of data are obtained. If there is more data, then the value may as well not exist.

Key: HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\LanguageResources
Value: UILanguage

How it comes about that registry settings whose names announce themselves as being meaningful for Microsoft Office should depend on a language pack whose installation is recorded in a setting for Internet Explorer is anyone’s guess.

If the language is not identified from these language-pack settings, it is sought instead from a setting that is specifically for Internet Explorer:

Key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International
Value: ResourceLocale

Data for this value is interpreted as the language ID, represented as case-insensitive hexadecimal digits, beginning with the most significant. The function accepts as many as 6 characters of string data, including a terminating null, or 6 bytes of other data (which the function will interpret as characters, provided that at least one is null). Characters after the hexadecimal digits are ignored.

If still no language ID is identified, the MUI language defaults to the install language. Details are given separately.