This function gets the MUI language.



Return Value

The function returns the language ID for the MUI language. It returns 0 to indicate failure.


In the SHLWAPI version 6.00 from Windows Vista, this function is simply a jump to the standard API function GetThreadUILanguage. This is at least a little odd. Inasmuch as the thread UI language is distinct in concept from the user default UI language and the system default UI language, it is never used by any other SHLWAPI code. In particular, it is never the language used by MLLoadLibrary when choosing which MUI satellite library to load.

Earlier Versions

In all earlier builds and versions, the function reliably returns the MUI language. This is the language that is in most cases the MLLoadLibrary function’s first candidate for choosing the MUI satellite library.


The MLGetUILanguage function is exported from SHLWAPI.DLL as ordinal 376 in version 5.00 and higher.

Though this function dates from as long ago as 1999, it was still not documented by Microsoft in the MSDN Library at least as late as the CD edition dated January 2004.

Microsoft has documented the function since then, apparently during 2005 or 2006, as one of the many SHLWAPI Wrapper Functions. As yet another demonstration that Microsoft makes no serious effort, the function is mistakenly attached to Remarks about thread pools and timer queues, and the documentation in the Windows Vista Software Development Kit dated January 2007 still has the function forwarding to GetUserDefaultUILanguage.

The behaviour for versions from Windows XP and earlier is documented by Microsoft as steps 3, 4 and 2 for the procedure followed by MLLoadLibrary.