Determines if the specified locale name is valid for a locale that is installed or supported on the operating system.
Note
An application running only on Windows Vista and later should call this function in preference to IsValidLocale to determine the validity of a supplemental locale.
BOOL IsValidLocaleName(
LPCWSTR lpLocaleName
)
lpLocaleName
Type: LPCWSTR
Pointer to the locale name to validate.
Type: BOOL
Returns a nonzero value if the locale name is valid, or returns 0 for an invalid name.
On Windows Vista and later, all supported locales should be installed on all operating systems.
This function can handle the name of a custom locale. Data is not guaranteed to be the same from computer to computer or between runs of an application. If your application must persist or transmit data, see Using Persistent Locale Data.
Beginning in Windows 8: If your app passes language tags to this function from the Windows.Globalization namespace, it must first convert the tags by calling ResolveLocaleName.
Windows Phone 8: This API is supported.
Header: Declared in winnls.h.
Library: Use kernelx.lib.