Export (0) Print
Expand All

SetLocaleInfo (Windows CE 5.0)

Windows CE 5.0
Send Feedback

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(
  LCID Locale, 
  LCTYPE LCType, 
  LPWTSTR lpLCData 
);

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.

ValueDescription
ERROR_INVALID_ACCESSThe access code is invalid.
ERROR_INVALID_FLAGSThe flags are invalid.
ERROR_INVALID_PARAMETERThe parameter is incorrect.

Remarks

The following table shows the LCTYPE values that are valid for this function.

ValueDescription
LOCALE_ICALENDARTYPECurrent calendar type. See LCTYPE Constants for exact values.
Note   If an image does not have a locale with a particular calendar type, then SetLocaleInfo will return ERROR_INVALID_PARAMETER. For example, on a US or Arabic image you cannot ask for a Japanese calander.
LOCALE_ICURRDIGITSNumber of fractional digits for the local monetary format. The maximum number of characters allowed for this string is 9.
LOCALE_ICURRENCYPositive currency mode. The maximum number of characters allowed for this string is 2. See LCTYPE Constants for exact values.
LOCALE_IDIGITSNumber of fractional digits. The maximum number of characters allowed for this string is 3.
LOCALE_IFIRSTDAYOFWEEKSpecification for the first day in a week. See LCTYPE Constants for exact values.
LOCALE_IFIRSTWEEKOFYEARSpecification for the first week of the year. See LCTYPE Constants for exact values.
LOCALE_ILZEROSpecification for leading zeros in decimal fields. The maximum number of characters allowed for this string is 2. See LCTYPE Constants for exact values.
LOCALE_IMEASURESystem 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_INEGCURRNegative currency mode. The maximum number of characters allowed for this string is 3. See LCTYPE Constants for exact values.
LOCALE_INEGNUMBERNegative number mode. See LCTYPE Constants for exact values.
LOCALE_IPAPERSIZEDefault paper size associated with the locale.
LOCALE_ITIMETime format specification. The maximum number of characters allowed for this string is 2. See LCTYPE Constants for exact values.
LOCALE_S1159String for the AM designator.
LOCALE_S2359String for the PM designator.
LOCALE_SCURRENCYString used as the local monetary symbol.
LOCALE_SDATECharacter(s) for the date separator.
LOCALE_SDECIMALCharacter(s) used as the decimal separator.
LOCALE_SGROUPINGSizes 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_SLISTCharacter(s) used to separate list items. For example, a comma is used in many locales.
LOCALE_SLONGDATELong 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_SMONDECIMALSEPCharacter(s) used as the monetary decimal separator.
LOCALE_SMONGROUPINGSizes 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_SMONTHOUSANDSEPCharacter(s) used as the monetary separator between groups of digits to the left of the decimal.
LOCALE_SNEGATIVESIGNString value for the negative sign.
LOCALE_SPOSITIVESIGNString value for the positive sign.
LOCALE_SSHORTDATEShort 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_STHOUSANDCharacter(s) used to separate groups of digits to the left of the decimal.
LOCALE_STIMECharacter(s) for the time separator.
LOCALE_STIMEFORMATTime 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_SYEARMONTHThe 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

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft