Localization: locale.h

A locale is a group of settings controlling things such as the symbol used as a decimal point. Locale values are stored in a structure of type struct lconv, defined in the locale.h header file. A locale can be specified by a string, which acts to specify a particular set of values for the structure members. The default locale is designated by the string "C". Table F.3 lists the localization functions, and a brief discussion follows.

Table F.3. Localization functions.
PrototypeDescription
char * setlocale(int category, const char * locale);The function sets certain locale values to the values specified by the locale and indicated by locale. The category value controls which locale values get set (see Table F.4). The function ...

Get C Primer Plus®, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.