National Language Support (NLS) Reference

The National Language Support (NLS) functions help applications support the different language- and locale-specific needs of users around the world.

Note Note that the Windows.Globablization namespace is not available on Xbox One.

Functions

Name Description
EnumCalendarInfoExEx Enumerates calendar information for a locale specified by name.
Note The application should call this function in preference to EnumCalendarInfo or EnumCalendarInfoEx if designed to run only on Windows Vista and later.

Note This function can enumerate data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
EnumDateFormatsExEx Enumerates the long date, short date, or year/month formats that are available for a locale specified by name.
Note The application should call this function in preference to EnumDateFormats or EnumDateFormatsEx if designed to run only on Windows Vista and later.

Note This function can enumerate data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
EnumSystemCodePagesA Enumerates the code pages that are either installed on or supported by an operating system.
EnumSystemCodePagesW Enumerates the code pages that are either installed on or supported by an operating system.
EnumSystemGeoID Enumerates the geographical location identifiers (type GEOID) that are available on the operating system.
EnumSystemLocalesEx Enumerates the locales that are either installed on or supported by an operating system.
Note The application should call this function in preference to EnumSystemLocales if designed to run only on Windows Vista and later.
EnumTimeFormatsEx Enumerates the time formats that are available for a locale specified by name.
Note The application should call this function in preference to EnumTimeFormats if designed to run only on Windows Vista and later.

Note This function can enumerate data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
FindNLSStringEx Locates a Unicode string (wide characters) or its equivalent in another Unicode string for a locale specified by name.
Caution Because strings with very different binary representations can compare as identical, this function can raise certain security concerns. For more information, see the discussion of comparison functions in Security Considerations: International Features.
GetCalendarInfoEx Retrieves information about a calendar for a locale specified by name.
Note The application should call this function in preference to GetCalendarInfo if designed to run only on Windows Vista and later.

Note This function can retrieve data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
GetCPInfo Retrieves information about any valid installed or available code page.
Note To obtain additional information about valid installed or available code pages, the application should use GetCPInfoEx.
GetCPInfoExA Retrieves information about any valid installed or available code page.
GetCPInfoExW Retrieves information about any valid installed or available code page.
GetCurrencyFormatEx Formats a number string as a currency string for a locale specified by name.
Note The application should call this function in preference to GetCurrencyFormat if designed to run only on Windows Vista and later.

Note This function can format data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
GetDurationFormatEx Formats a duration of time as a time string for a locale specified by name.
Note The application should call this function in preference to GetDurationFormat if designed to run only on Windows Vista and later.

Note This function can format data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
GetGeoInfoA Retrieves information about a specified geographical location.
GetGeoInfoW Retrieves information about a specified geographical location.
GetLocaleInfoEx Retrieves information about a locale specified by name.
Note The application should call this function in preference to GetLocaleInfo if designed to run only on Windows Vista and later.

Note This function can retrieve data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
GetNLSVersionEx Retrieves information about the current version of a specified NLS capability for a locale specified by name.
Note The application should call this function in preference to GetNLSVersion if designed to run only on Windows Vista and later.
GetNumberFormatEx Formats a number string as a number string customized for a locale specified by name.
Note The application should call this function in preference to GetNumberFormat if designed to run only on Windows Vista and later.

Note This function can format data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
GetStringScripts Provides a list of scripts used in the specified Unicode string.
GetSystemDefaultLocaleName Retrieves the system default locale name.
Note The application should call this function in preference to GetSystemDefaultLCID if designed to run only on Windows Vista and later.
GetUserDefaultLocaleName Retrieves the system’s default locale name.
GetUserGeoID Retrieves information about the geographical location of the user. For more information, see Table of Geographical Locations.
IdnToAscii Converts an internationalized domain name (IDN) or another internationalized label to a Unicode (wide character) representation of the ASCII string that represents the name in the Punycode transfer encoding syntax.
Caution This function implements the RFC 3490: Internationalizing Domain Names in Applications (IDNA) standard algorithm for converting an IDN to Punycode. The standard introduces some security issues. One issue is that glyphs representing certain characters from different scripts might appear similar or even identical. For example, in many fonts, Cyrillic lowercase A (“а”) is indistinguishable from Latin lowercase A (“a”). There is no way to tell visually that “example.com” and “exаmple.com” are two different domain names, one with a Latin lowercase A in the name, the other with a Cyrillic lowercase A. For more information about IDN-related security concerns, see Handling Internationalized Domain Names (IDNs).
IdnToNameprepUnicode Converts an internationalized domain name (IDN) or another internationalized label to the NamePrep form specified by Network Working Group RFC 3491, but does not perform the additional conversion to Punycode. For more information and links to related draft standards, see Handling Internationalized Domain Names (IDNs).
IdnToUnicode Converts the Punycode form of an internationalized domain name (IDN) or another internationalized label to the normal Unicode UTF-16 encoding syntax.
Caution This function implements the RFC 3490: Internationalizing Domain Names in Applications (IDNA) standard algorithms for the Punycode encoding of Unicode. The standard introduces some security issues. One issue is that glyphs representing certain characters from different scripts might appear similar or even identical. For example, in many fonts, Cyrillic lowercase A (“а”) is indistinguishable from Latin lowercase A (“a”). There is no way to tell visually that “example.com” and “exаmple.com” are two different domain names, one with a Latin lowercase A in the name, the other with a Cyrillic lowercase A. For more information about IDN-related security concerns, see Handling Internationalized Domain Names (IDNs).
IsNormalizedString Verifies that a string is normalized according to Unicode 4.0 TR#15. For more information, see Using Unicode Normalization to Represent Strings.
IsValidCodePage Determines if a specified code page is valid.
IsValidLocaleName 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.
IsValidNLSVersion Determines if the NLS version is valid for a given NLS function.
LCIDToLocaleName Converts a locale identifier to a locale name.
Note For custom locales, including those created by Microsoft, your applications should prefer locale names over locale identifiers.
LocaleNameToLCID Converts a locale name to a locale identifier.
Note For custom locales, including those created by Microsoft, your applications should prefer locale names over locale identifiers.
NormalizeString Normalizes characters of a text string according to Unicode 4.0 TR#15. For more information, see Using Unicode Normalization to Represent Strings.
ResolveLocaleName Finds a possible locale name match for the supplied name.
VerifyScripts Compares two enumerated lists of scripts.

Structures

Name Description
CPINFO Contains information about a code page. This structure is used by the GetCPInfo function.
FILEMUIINFO Contains information about a file, related to its use with MUI. Most of this data is stored in the resource configuration data for the particular file. When this structure is retrieved by GetFileMUIInfo, not all fields are necessarily filled in. The fields used depend on the flags that the application has passed to that function.
Note Your MUI applications can use the MUI macros to access this structure.
NLSVERSIONINFO Deprecated. Contains version information about an NLS capability.Starting with Windows 8, your app should use NLSVERSIONINFOEX instead of NLSVERSIONINFO.
NLSVERSIONINFOEX Contains version information about an NLS capability.

Enumerations

Name Description
NORM_FORM Specifies the supported normalization forms.
SYSGEOCLASS Specifies the geographical location class.
SYSGEOTYPE Defines the type of geographical location information requested in the GetGeoInfo function.
SYSNLS_FUNCTION Specifies NLS function capabilities.