[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/navbar_content&action=edit)

The locale facility includes internationalization support for character
classification and string collation, numeric, monetary, and date/time
formatting and parsing, and message retrieval. Locale settings control the
behavior of stream I/O, regular expression library, and other components of
the C++ standard library.

##  Contents

  * 1  Locales and facets 
    * 1.1  Locales 
    * 1.2  Facet category base classes 
    * 1.3  ctype facets 
    * 1.4  numeric facets 
    * 1.5  collate facets 
    * 1.6  time facets 
    * 1.7  monetary facets 
    * 1.8  messages facets 
  * 2  Character classification and conversion 
    * 2.1  Character classification 
    * 2.2  Character conversions 
    * 2.3  String and stream conversions 
  * 3  Text encoding identifications 
  * 4  Locale-independent unicode conversion facets 
  * 5  C library locales 
  * 6  See also 

  
---  
  
###  [ [ edit ](/mwiki/index.php?title=cpp/locale&action=edit&section=1 "Edit
section: Locales and facets") ]  Locales and facets

Defined in header ` [ <locale> ](/w/cpp/header/locale "cpp/header/locale") `  
---  
  
#####  Locales  
  
[ locale  ](/w/cpp/locale/locale "cpp/locale/locale") |  set of polymorphic facets that encapsulate cultural differences   
(class)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_locale&action=edit)  
[ use_facet  ](/w/cpp/locale/use_facet "cpp/locale/use facet") |  obtains a facet from a locale   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_use_facet&action=edit)  
[ has_facet  ](/w/cpp/locale/has_facet "cpp/locale/has facet") |  checks if a locale implements a specific facet   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_has_facet&action=edit)  
  
#####  Facet category base classes  
  
[ ctype_base  ](/w/cpp/locale/ctype_base "cpp/locale/ctype base") |  defines character classification categories   
(class)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_ctype_base&action=edit)  
[ codecvt_base  ](/w/cpp/locale/codecvt_base "cpp/locale/codecvt base") |  defines character conversion errors   
(class)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_codecvt_base&action=edit)  
[ messages_base  ](/w/cpp/locale/messages_base "cpp/locale/messages base") |  defines messages catalog type   
(class)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_messages_base&action=edit)  
[ time_base  ](/w/cpp/locale/time_base "cpp/locale/time base") |  defines date format constants   
(class)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_time_base&action=edit)  
[ money_base  ](/w/cpp/locale/money_base "cpp/locale/money base") |  defines monetary formatting patterns   
(class)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_money_base&action=edit)  
  
#####  ctype facets  
  
[ ctype  ](/w/cpp/locale/ctype "cpp/locale/ctype") |  defines character classification tables   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_ctype&action=edit)  
[ ctype_byname  ](/w/cpp/locale/ctype_byname "cpp/locale/ctype byname") |  represents the system-supplied  [ std::ctype ](/w/cpp/locale/ctype "cpp/locale/ctype") for the named locale   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/dsc_ctype_byname&action=edit)  
[ ctype  <char> ](/w/cpp/locale/ctype_char "cpp/locale/ctype char") |  specialization of  [ std::ctype ](/w/cpp/locale/ctype "cpp/locale/ctype") for type  char    
(class template specialization)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Te