SetLocaleInfo (Windows CE 5.0)
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.
BOOL SetLocaleInfo(LCIDLocale, LCTYPE LCType, LPWTSTRlpLCData );
Parameters
- Locale
[in] 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] 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 the GetLastError function. The following table shows the possible values for GetLastError.
Value | Description |
---|---|
ERROR_INVALID_ACCESS | The access code is invalid. |
ERROR_INVALID_FLAGS | The flags are invalid. |
ERROR_INVALID_PARAMETER | The parameter is incorrect. |
Remarks
The following table shows the LCTYPE values that are valid for this function.
Value | Description |
---|---|
LOCALE_ICALENDARTYPE | Current calendar type. See LCTYPE Constants for exact values.
|
LOCALE_ICURRDIGITS | Number of fractional digits for the local monetary format. The maximum number of characters allowed for this string is 9. |
LOCALE_ICURRENCY | Positive currency mode. The maximum number of characters allowed for this string is 2. See LCTYPE Constants for exact values. |
LOCALE_IDIGITS | Number of fractional digits. The maximum number of characters allowed for this string is 3. |
LOCALE_IFIRSTDAYOFWEEK | Specification for the first day in a week. See LCTYPE Constants for exact values. |
LOCALE_IFIRSTWEEKOFYEAR | Specification for the first week of the year. See LCTYPE Constants for exact values. |
LOCALE_ILZERO | Specification for leading zeros in decimal fields. The maximum number of characters allowed for this string is 2. See LCTYPE Constants for exact values. |
LOCALE_IMEASURE | System of measurement. This value is zero if the metric system (Systéme International d'Unités, or S.I.) is used and 1 if the U.S. system is used. The maximum number of characters allowed for this string is 2. |
LOCALE_INEGCURR | Negative currency mode. The maximum number of characters allowed for this string is 3. See LCTYPE Constants for exact values. |
LOCALE_INEGNUMBER | Negative number mode. See LCTYPE Constants for exact values. |
LOCALE_IPAPERSIZE | Default paper size associated with the locale. |
LOCALE_ITIME | Time format specification. The maximum number of characters allowed for this string is 2. See LCTYPE Constants for exact values. |
LOCALE_S1159 | String for the AM designator. |
LOCALE_S2359 | String for the PM designator. |
LOCALE_SCURRENCY | String used as the local monetary symbol. |
LOCALE_SDATE | Character(s) for the date separator. |
LOCALE_SDECIMAL | Character(s) used as the decimal separator. |
LOCALE_SGROUPING | Sizes for each group of digits to the left of the decimal. An explicit size is needed for each group; semicolons separate sizes. If the last value is zero, the preceding value is repeated. To group thousands, specify 3; zero, for example. |
LOCALE_SLIST | Character(s) used to separate list items. For example, a comma is used in many locales. |
LOCALE_SLONGDATE | Long date formatting string for this locale. The string can consist of a combination of day, month, and year format pictures defined in the Day, Month, Year, and Era Format Pictures table in National Language Support Constants and any string of characters enclosed in single quotes. Characters in single quotes remain as given. |
LOCALE_SMONDECIMALSEP | Character(s) used as the monetary decimal separator. |
LOCALE_SMONGROUPING | Sizes for each group of monetary digits to the left of the decimal. An explicit size is needed for each group; semicolons separate sizes. If the last value is zero, the preceding value is repeated. To group thousands, specify 3;0, for example. |
LOCALE_SMONTHOUSANDSEP | Character(s) used as the monetary separator between groups of digits to the left of the decimal. |
LOCALE_SNEGATIVESIGN | String value for the negative sign. |
LOCALE_SPOSITIVESIGN | String value for the positive sign. |
LOCALE_SSHORTDATE | Short date formatting string for this locale. The string can consist of a combination of day, month, and year format pictures defined in Day, Month, Year, and Era Format Pictures table in National Language Support Constants. |
LOCALE_STHOUSAND | Character(s) used to separate groups of digits to the left of the decimal. |
LOCALE_STIME | Character(s) for the time separator. |
LOCALE_STIMEFORMAT | Time formatting strings for this locale. The string can consist of a combination of the hour, minute, and second format pictures defined in the Hour, Minute, and Second Format Pictures table in National Language Support Constants. |
LOCALE_SYEARMONTH | The Year/Month formatting string for the locale. This string shows the proper format for a date string that contains only the year and the month. |
Microsoft Windows CE 1.0 through 2.01 do not support the LOCALE_IPAPERSIZE LCTYPE value.
For more information about LCTYPE, see LCTYPE Constants.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Winnls.h.
Link Library: Coreloc.lib.
See Also
GetLocaleInfo | MAKELCID | LCTYPE Constants
Send Feedback on this topic to the authors