int get_locale_information(locale_identity locale,
                           locale_type type,
                           character* data,
                           int length)

This function obtains information about a specified locale.


locale_identity locale

The locale identity. This identity may be formed via the function make_locale or it may be one of the predefined locales locale_system_default or locale_user_default.

locale_type type

The type of information about the locale that is being retrieved. This may be one of the enumerators from enumeration locale_types, possibly combined (bitwise or) with the type locale_types::use_no_override. The option locale_types::use_no_override causes the specified system value (rather than user value) to be returned.

character* data

A pointer to a buffer to hold the requested information.

int length

The length of the buffer pointed to by the previous parameter. If zero is specified, the length (in characters) of the buffer needed to hold the requested information is returned. When zero is specified for this parameter, the previous parameter is ignored.



If length is set to zero, the value returned is the number of characters required to hold the specified information. If length is non-zero, the value returned is the number of characters copied to the specified buffer. When the function fails, zero is returned.


all information is returned in character format. Numeric data is converted to character data in decimal form.