Shell Language

The shell language is a more-or-less invented name for the language that is selected by the MLLoadLibrary function when the meaningful bits of its dwCrossCodePage argument are ML_SHELL_LANGUAGE.

When executing on Windows 2000 and higher, the shell 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 the ML_SHELL_LANGUAGE case of dwCrossCodePage gets no special treatment. When builds of version 6.00 from Windows XP and Internet Explorer 6.0, and all earlier versions back to 5.00, find themselves executing on Windows 2000 or higher, their coding distinguishes the ML_SHELL_LANGUAGE case but evaluates the shell language just by calling the standard API function GetUserDefaultUILanguage, if this is available as an export from KERNEL32.

Evaluation From Registry Settings

When these earlier builds execute on Windows 2000 or higher, they make their own determination of the shell language from the registry. The defining registry values are:

Key: HKEY_USERS\.DEFAULT\Control Panel\International
Value: Locale

if running on a Windows NT system, else

Key: HKEY_USERS\.Default\Control Panel\desktop\ResourceLocale
Value: default

For both, the data is expected to begin with the language ID, represented as case-insensitive hexadecimal digits, from the most significant to the least. The function accepts as many as 12 characters of data, including a terminating null, or 12 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.