setlocale [C++ Reference]
Keywords: c,date,setlocale
Date: 2008-12-19T10:55:17-0800

[[setlocale]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## setlocale

Syntax:

        #include <clocale>
        char *setlocale( int category, const char * locale );

The setlocale function is used to set and retrieve the current locale. If `locale` is NULL, the current locale is returned. Otherwise, `locale` is used to set the locale for the given category.

The argument `category` can have the following values:

Value | Description
--- | ---
LC_ALL | All of the locale
LC_TIME | Date and time formatting
LC_NUMERIC | Number formatting
LC_COLLATE | String collation and regular expression matching
LC_CTYPE | Regular expression matching, conversion, case-sensitive comparison, wide character functions, and character classification.
LC_MESSAGES | For natural language messages

Related Topics: strcoll

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •