summaryrefslogtreecommitdiffstats
path: root/newlib/libc/locale/nl_langinfo.3
blob: 96819e1c7fc3a924599dc21935d52122f9006831 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
NL_LANGINFO(3)                     BSD Library Functions Manual                    NL_LANGINFO(3)

NAME
     nl_langinfo -- language information

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <langinfo.h>

     char *
     nl_langinfo(nl_item item);

DESCRIPTION
     The nl_langinfo() function returns a pointer to a string containing information relevant to
     the particular language or cultural area defined in the program's locale.  The manifest con-
     stant names and values of item are defined in <langinfo.h>.

     Calls to setlocale() with a category corresponding to the category of item, or to the cate-
     gory LC_ALL, may overwrite buffer pointed by the return value.

EXAMPLES
     For example:

           nl_langinfo(ABDAY_1)

     would return a pointer to the string "Dom" if the identified language was Portuguese, and
     "Sun" if the identified language was English.

RETURN VALUES
     In a locale where langinfo data is not defined, nl_langinfo() returns a pointer to the cor-
     responding string in the POSIX locale.  In all locales, nl_langinfo() returns a pointer to
     an empty string if item contains an invalid setting.

SEE ALSO
     setlocale(3)

STANDARDS
     The nl_langinfo() function conforms to Version 2 of the Single UNIX Specification ("SUSv2").

HISTORY
     The nl_langinfo() function first appeared in FreeBSD 4.6.

BSD                                        May 3, 2001                                        BSD