Facebook Page Twitter Page LinkedIn Page
× C++ Standard Library C++ STL Library

The C++ <clocale> header supports localization specific settings, such as culture-specific date formats or country-specific currency symbols. Each system and specific compiler implementation may provide different choices of locales to be selected (using setlocale() function), but at least two locales are available to choose for any C++ program:

  • "C" - A minimal locale or rather neutral locale which has the same settings across all systems and compilers. It is the locale used by default on all C programs.
  • "" - Environment's default locale. It is the locale configuration provided by the environment where the application is running. This usually contains more localization information than the "C" locale.

These functions, types and macros are available to use in a current program after including the header file using - #include <clocale> or #include <locale.h>. All functions, types and macros of this header file are listed below:

Library Functions

setlocale Set or retrieve locale.
localeconv Get numeric and monetary formatting details of the current locale.

Library Types

lconv Formatting details, returned by localeconv() function.

Library Macros

Macro constants

locale categories for setlocale() function.