Each locale consists of a fixed number of key-value pairs known as locale items which describe the conventions for that locale. Each locale item is referred to by an integer key of the type LocaleItem.

    typedef int LocaleItem;

Every LocaleItem has a symbolic name of the form LOCI_name, where the first character of name is a prefix indicating the value type:

The following section lists all of the defined locale items. The total number of locale items (136 as of the latest version of ULS) is indicated by the LOCI_iMaxItem item; this should be the same for every locale.

The value of any item can be queried using the UniQueryLocaleItem function, which writes the current value to a string variable. In addition, items with integer values (those with a name prefix of i or x) can be queried using UniQueryLocaleValue, which writes the current value to an integer variable.

The locale conventions structure

The locale conventions structure (struct UniLconv or UNILCONV) contains information about how numbers and currency values are represented under a given locale. This structure may be obtained for a specified locale using UniQueryLocaleInfo.

typedef struct UniLconv {  UniChar   *decimal_point;         /* non-monetary decimal point            */
  UniChar   *thousands_sep;         /* non-monetary thousands separator      */
  short     *grouping;              /* non-monetary size of grouping         */
  UniChar   *int_curr_symbol;       /* int'l currency symbol and separator   */
  UniChar   *currency_symbol;       /* local  currency symbol                */
  UniChar   *mon_decimal_point;     /* monetary decimal point                */
  UniChar   *mon_thousands_sep;     /* monetary thousands separator          */
  short     *mon_grouping;          /* monetary size of grouping             */
  UniChar   *positive_sign;         /* non-negative values sign              */
  UniChar   *negative_sign;         /* negative values sign                  */
  short     int_frac_digits;        /* no of fractional digits int currency  */
  short     frac_digits;            /* no of fractional digits loc currency  */
  short     p_cs_precedes;          /* nonneg curr sym 1-precedes,0-succeeds */
  short     p_sep_by_space;         /* nonneg curr sym 1-space,0-no space    */
  short     n_cs_precedes;          /* neg curr sym 1-precedes,0-succeeds    */
  short     n_sep_by_space;         /* neg curr sym 1-space 0-no space       */
  short     p_sign_posn;            /* positioning of nonneg monetary sign   */
  short     n_sign_posn;            /* positioning of negative monetary sign */
  short     os2_mondecpt;           /* os2 curr sym positioning              */
  UniChar   *debit_sign;            /* non-neg-valued monetary sym - "DB"    */
  UniChar   *credit_sign;           /* negative-valued monetary sym - "CR"   */
  UniChar   *left_parenthesis;      /* negative-valued monetary sym - "("    */
  UniChar   *right_parenthesis;     /* negative-valued monetary sym - ")"    */
} UNILCONV;


[Back] [Next]