SetLocaleInfo

This function sets an item of locale information. It does so by making an entry in the process portion of the locale table. This setting only affects the user override portion of the locale settings; it does not set the system defaults.

At a Glance

Header file: Winnls.h
Windows CE versions: 1.0 and later

Syntax

BOOL SetLocaleInfo(LCID Locale, LCTYPE LCType, LPWTSTR lpLCData);

Parameters

Locale

[in] Specifies the locale whose information the function will set. The locale provides a context for the string mapping or sort key generation. An application can use the MAKELCID macro to create a locale identifier.

LCType

[in] Specifies the type of locale information to be set by the function. Note that only one LCTYPE may be specified per call. Not all LCTYPE values are valid; see the list of valid LCTYPE values in the following Remarks section.

lpLCData

[in] Pointer to a null-terminated string that contains the locale information the function will set. The information must be in the specified LCTYPE’s particular format.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError. Possible values for GetLastError include the following:

Remarks

The following LCTYPE values are valid for this function:

LOCALE_ICALENDARTYPE LOCALE_SDATE
LOCALE_ICURRDIGITS LOCALE_SDECIMAL
LOCALE_ICURRENCY LOCALE_SGROUPING
LOCALE_IDIGITS LOCALE_SLIST
LOCALE_IFIRSTDAYOFWEEK LOCALE_SLONGDATE
LOCALE_IFIRSTWEEKOFYEAR LOCALE_SMONDECIMALSEP
LOCALE_ILZERO LOCALE_SMONGROUPING
LOCALE_IMEASURE LOCALE_SMONTHOUSANDSEP
LOCALE_INEGCURR LOCALE_SNEGATIVESIGN
LOCALE_INEGNUMBER LOCALE_SPOSITIVESIGN
LOCALE_IPAPERSIZE LOCALE_SSHORTDATE
LOCALE_ITIME LOCALE_STHOUSAND
LOCALE_S1159 LOCALE_STIME
LOCALE_S2359 LOCALE_STIMEFORMAT
LOCALE_SCURRENCY LOCALE_SYEARMONTH

Windows CE versions 1.0 through 2.01 do not support the LOCALE_IPAPERSIZE LCTYPE value.

See Also

GetLocaleInfo