RtlIsValidLocaleName function

Determines if a locale specified by name is installed or supported on the operating system.

Note

This function is available for use in Windows Vista only. It might be altered or unavailable in subsequent versions. Applications should use IsValidLocaleName.

 

Syntax

BOOL RtlIsValidLocaleName(
  _In_ LPCWSTR LocaleName,
  _In_ ULONG   Flags
);

Parameters

LocaleName [in]

Locale name to validate. This parameter can specify the name of a custom locale.

Flags [in]

Flags indicating if neutral locales are considered valid. Currently the only defined flag is LOCALE_ALLOW_NEUTRAL. The default value is that they are not.

Return value

Returns a nonzero value if successful, or 0 otherwise.

Remarks

This function is similar to IsValidLocaleName. The only difference is that if LOCALE_ALLOW_NEUTRAL is set, RtlIsValidLocaleName returns TRUE for a name that corresponds to a neutral locale (such as "en"), while IsValidLocaleName returns TRUE only for a specific locale (such as "en-US"). Neutral locales are used as part of the resource loading strategy in Windows Vista and later. Only a small class of highly specialized applications use RtlIsValidLocaleName and set LOCALE_ALLOW_NEUTRAL, because neutral locales are of very limited use. None of the functions described in Calling the "Locale Name" Functions accept neutral locales as inputs.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Ntrtl.h
Library
Kernel32.lib
DLL
Kernel32.dll

See also

National Language Support

National Language Support Functions

IsValidLocaleName