10.7 Handling Culture-Specific Information

Each locale contains the following cultural information:

You can extract some of this cultural information using the nl_langinfo function and the localeconv function. See Section 10.7.1.

10.7.1 Extracting Cultural Information From a Locale

The nl_langinfo function returns a pointer to a string that contains an item of information obtained from the program's current locale. The information you can extract from the locale is:

The localeconv function returns a pointer to a data structure that contains numeric formatting and monetary formatting data from the LC_NUMERIC and LC_MONETARY categories.

10.7.2 Date and Time Formatting Functions

The functions that use the date and time information are:

10.7.3 Monetary Formatting Function

The strfmon function uses the monetary information in a locale to convert a number of values into a string. The format of the string is controlled by a format string.

10.7.4 Numeric Formatting

The information in LC_NUMERIC is used by various functions. For example, strtod, wcstod, and the print and scan functions determine the radix character from the LC_NUMERIC category.


Previous Page | Next Page | Table of Contents | Index