setlocale.3 - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
setlocale.3 (1641B)
---
1 .TH setlocale 3
2 .SH NAME
3 setlocale - set the current locale
4 .SH SYNOPSIS
5 #include <locale.h>
6
7 char *setlocale(int category, const char *locale);
8 .SH DESCRIPTION
9 The
10 .BR setlocale ()
11 function is used to set or query the program's current locale.
12 It can be used to set or query the locale entirely or partially.
13 If
14 .I locale
15 is not NULL,
16 the program's current locale is modified according to the arguments.
17 The argument
18 .I category
19 determines which parts of the program's current locale
20 should be modified.
21
22 .nf
23 Category Governs
24 LC_ALL All of the locale
25 LC_COLLATE String collation
26 LC_CTYPE Character classification
27 LC_MONETARY Formatting of monetary values
28 LC_NUMERIC Formatting of nonmonetary numeric values
29 LC_TIME Formatting of date and time values
30 .fi
31
32 A value of
33 .B C
34 for
35 .I locale
36 specifies the minimum environment for C translation;
37 a value of " " for
38 .I locale
39 specifies the locale-specific native environment.
40
41 At program startup,
42 .BR setlocale (LC_ALL,"C");
43 is executed.
44 .SH RETURN VALUE
45 A pointer to the string associated with the specified
46 .I category
47 for the new
48 .I locale
49 is returned if it can be honored.
50 A pointer to the string associated with the specified
51 .I category
52 for the current locale is returned if
53 .I locale
54 is NULL.
55 The string returned is such that a subsequent call
56 with that string value and its associated category
57 will restore that part of the program's locale.
58 The string pointed to shall not be modified by the program,
59 but may be overwritten by a subsequent call to the setlocale function.
60 .SH STANDARDS
61 ISO/IEC 9899:1999 Section 7.11.1.1 Paragraph 1,2,3,4,6,7,8
62 .SH SEE ALSO
63 .B locale.h(3)