Platform SDK: International Features |
The IsValidLocale function applies a validity test to a locale identifier. The dwFlags parameter determines the nature of the validity test. Currently, the function tests whether a locale identifier is installed or supported on the calling system.
BOOL IsValidLocale( LCID Locale, // locale identifier DWORD dwFlags // validity test );
Value | Meaning |
---|---|
LCID_INSTALLED | Test whether the locale identifier is both supported and installed. |
LCID_SUPPORTED | Test whether the locale identifier is supported. |
If the locale identifier passes the specified validity test, the return values is a nonzero value.
If the locale identifier does not pass the specified validity test, the return value is zero.
If the LCID_INSTALLED flag is specified and this function returns a nonzero value, the locale identifier is both supported and installed on the system. Having an LCID installed implies that the full level of language support is available for this locale. This includes code page translation tables, keyboard layouts, fonts, sorting and locale data.
If LCID_SUPPORTED is specified and this function returns zero, the locale identifier is supported in the release, but not necessarily installed on the system.
For more information, see Locales.
Windows NT/2000: Requires Windows NT 3.5 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winnls.h; include Windows.h.
Library: Use Kernel32.lib.
National Language Support Overview, National Language Support Functions, GetLocaleInfo