Export (0) Print
Expand All

GetThreadUILanguage function

Returns the language identifier of the first user interface language for the current thread.

Syntax


LANGID GetThreadUILanguage(void);

Parameters

This function has no parameters.

Return value

Returns the identifier for a language explicitly associated with the thread by SetThreadUILanguage or SetThreadPreferredUILanguages. Alternatively, if no language has been explicitly associated with the current thread, the identifier can indicate a user or system user interface language.

Remarks

Calling this function is identical to calling GetThreadPreferredUILanguages with dwFlags set to MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK | MUI_LANGUAGE_ID and using the first language in the retrieved list.

The return value for this function does not provide useful information about a Language Interface Pack (LIP) language if that language corresponds to a supplemental locale. For such a language, the function returns the hexadecimal value "1400", which corresponds to LOCALE_CUSTOM_UI_DEFAULT if that language is specified in the user preferred UI languages list. If the language is not specified in the user preferred UI languages list, the function returns the value "1000", corresponding to LOCALE_CUSTOM_UNSPECIFIED.

C# Signature


[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
        static extern System.UInt16 GetThreadUILanguage();


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Winnls.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Multilingual User Interface
Multilingual User Interface Functions
GetThreadPreferredUILanguages
SetThreadPreferredUILanguages
SetThreadUILanguage

 

 

Community Additions

ADD
Show:
© 2014 Microsoft