xref: /freebsd/usr.bin/locale/locale.1 (revision bdcbfde31e8e9b343f113a1956384bdf30d1ed62)
1.\"
2.\" Copyright (c) 2003 Alexey Zelkin <phantom@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.Dd November 18, 2012
27.Dt LOCALE 1
28.Os
29.Sh NAME
30.Nm locale
31.Nd get locale-specific information
32.Sh SYNOPSIS
33.Nm
34.Op Fl a | m
35.Nm
36.Fl k
37.Ic list
38.Op Ar prefix
39.Nm
40.Op Fl ck
41.Op Ar keyword ...
42.Sh DESCRIPTION
43The
44.Nm
45utility is supposed to provide most locale specific information to
46the standard output.
47.Pp
48When
49.Nm
50is invoked without arguments, it will print out a summary of the current
51locale environment, subject to the environment settings and
52internal status.
53.Pp
54When
55.Nm
56is invoked with the
57.Ar keyword
58arguments, and no options are specified, it will print out the
59values of all keywords specified, using the current locale settings.
60.Pp
61The following options are available:
62.Bl -tag -width indent
63.It Fl a
64Print names of all available locales.
65While looking for locales,
66.Nm
67will respect the
68.Ev PATH_LOCALE
69environment variable, and use it instead of the system's default locale
70directory.
71.It Fl c
72Print the category name for all selected keywords.
73If no keywords are selected, print the category name for all defined
74keywords.
75.It Fl k
76Print the names and values of all selected keywords.
77If no keywords are selected, print the names and values of all defined
78keywords.
79.It Fl m
80Print names of all available charmaps.
81.El
82.Sh IMPLEMENTATION NOTES
83The special
84.Pf ( Fx
85specific) keyword
86.Cm list
87can be used to retrieve the human readable list of all available keywords.
88If so,
89a prefix string can be defined to limit the amount of keywords returned.
90.Sh EXIT STATUS
91.Ex -std
92.Sh SEE ALSO
93.Xr setlocale 3
94.Sh STANDARDS
95The
96.Nm
97utility conforms to
98.St -p1003.1-2004 .
99The
100.Ev LC_CTYPE ,
101.Ev LC_MESSAGES
102and
103.Ev NLSPATH
104environment variables are not interpreted.
105.Sh BUGS
106Since
107.Fx
108does not support
109.Em charmap Ns s
110in their
111.Tn POSIX
112meaning,
113.Nm
114emulates the
115.Fl m
116option using the CODESETs listing of all available locales.
117