xref: /freebsd/usr.bin/locale/locale.1 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
110efe9a9SAlexey Zelkin.\"
210efe9a9SAlexey Zelkin.\" Copyright (c) 2003 Alexey Zelkin <phantom@FreeBSD.org>
310efe9a9SAlexey Zelkin.\" All rights reserved.
410efe9a9SAlexey Zelkin.\"
510efe9a9SAlexey Zelkin.\" Redistribution and use in source and binary forms, with or without
610efe9a9SAlexey Zelkin.\" modification, are permitted provided that the following conditions
710efe9a9SAlexey Zelkin.\" are met:
810efe9a9SAlexey Zelkin.\" 1. Redistributions of source code must retain the above copyright
910efe9a9SAlexey Zelkin.\"    notice, this list of conditions and the following disclaimer.
1010efe9a9SAlexey Zelkin.\" 2. Redistributions in binary form must reproduce the above copyright
1110efe9a9SAlexey Zelkin.\"    notice, this list of conditions and the following disclaimer in the
1210efe9a9SAlexey Zelkin.\"    documentation and/or other materials provided with the distribution.
1310efe9a9SAlexey Zelkin.\"
1410efe9a9SAlexey Zelkin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1510efe9a9SAlexey Zelkin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1610efe9a9SAlexey Zelkin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1710efe9a9SAlexey Zelkin.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1810efe9a9SAlexey Zelkin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1910efe9a9SAlexey Zelkin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2010efe9a9SAlexey Zelkin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2110efe9a9SAlexey Zelkin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2210efe9a9SAlexey Zelkin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2310efe9a9SAlexey Zelkin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2410efe9a9SAlexey Zelkin.\" SUCH DAMAGE.
2510efe9a9SAlexey Zelkin.\"
26*6b8910e4SGreg Lehey.Dd November 18, 2012
2710efe9a9SAlexey Zelkin.Dt LOCALE 1
2810efe9a9SAlexey Zelkin.Os
2910efe9a9SAlexey Zelkin.Sh NAME
3010efe9a9SAlexey Zelkin.Nm locale
3110efe9a9SAlexey Zelkin.Nd get locale-specific information
3210efe9a9SAlexey Zelkin.Sh SYNOPSIS
3310efe9a9SAlexey Zelkin.Nm
34fdc1ec36SRuslan Ermilov.Op Fl a | m
3510efe9a9SAlexey Zelkin.Nm
36a250649bSEdwin Groothuis.Fl k
37a250649bSEdwin Groothuis.Ic list
38a250649bSEdwin Groothuis.Op Ar prefix
39a250649bSEdwin Groothuis.Nm
4010efe9a9SAlexey Zelkin.Op Fl ck
41f27de774SGreg Lehey.Op Ar keyword ...
4210efe9a9SAlexey Zelkin.Sh DESCRIPTION
4310efe9a9SAlexey ZelkinThe
4410efe9a9SAlexey Zelkin.Nm
4510efe9a9SAlexey Zelkinutility is supposed to provide most locale specific information to
4610efe9a9SAlexey Zelkinthe standard output.
4710efe9a9SAlexey Zelkin.Pp
4810efe9a9SAlexey ZelkinWhen
4910efe9a9SAlexey Zelkin.Nm
505bd361abSChristian Bruefferis invoked without arguments, it will print out a summary of the current
51fdc1ec36SRuslan Ermilovlocale environment, subject to the environment settings and
5210efe9a9SAlexey Zelkininternal status.
5310efe9a9SAlexey Zelkin.Pp
5410efe9a9SAlexey ZelkinWhen
5510efe9a9SAlexey Zelkin.Nm
56fdc1ec36SRuslan Ermilovis invoked with the
57fdc1ec36SRuslan Ermilov.Ar keyword
58fdc1ec36SRuslan Ermilovarguments, and no options are specified, it will print out the
59fdc1ec36SRuslan Ermilovvalues of all keywords specified, using the current locale settings.
6010efe9a9SAlexey Zelkin.Pp
6110efe9a9SAlexey ZelkinThe following options are available:
6210efe9a9SAlexey Zelkin.Bl -tag -width indent
6310efe9a9SAlexey Zelkin.It Fl a
64fdc1ec36SRuslan ErmilovPrint names of all available locales.
655bd361abSChristian BruefferWhile looking for locales,
6610efe9a9SAlexey Zelkin.Nm
675bd361abSChristian Bruefferwill respect the
6810efe9a9SAlexey Zelkin.Ev PATH_LOCALE
695bd361abSChristian Bruefferenvironment variable, and use it instead of the system's default locale
7010efe9a9SAlexey Zelkindirectory.
7110efe9a9SAlexey Zelkin.It Fl c
72fdc1ec36SRuslan ErmilovPrint the category name for all selected keywords.
73f27de774SGreg LeheyIf no keywords are selected, print the category name for all defined
74f27de774SGreg Leheykeywords.
75*6b8910e4SGreg Lehey.It Fl k
76*6b8910e4SGreg LeheyPrint the names and values of all selected keywords.
77*6b8910e4SGreg LeheyIf no keywords are selected, print the names and values of all defined
78*6b8910e4SGreg Leheykeywords.
79*6b8910e4SGreg Lehey.It Fl m
80*6b8910e4SGreg LeheyPrint names of all available charmaps.
8110efe9a9SAlexey Zelkin.El
82324cfdb7SRuslan Ermilov.Sh IMPLEMENTATION NOTES
83fdc1ec36SRuslan ErmilovThe special
84fdc1ec36SRuslan Ermilov.Pf ( Fx
85fdc1ec36SRuslan Ermilovspecific) keyword
86fdc1ec36SRuslan Ermilov.Cm list
87fdc1ec36SRuslan Ermilovcan be used to retrieve the human readable list of all available keywords.
88a250649bSEdwin GroothuisIf so,
89a250649bSEdwin Groothuisa prefix string can be defined to limit the amount of keywords returned.
90a866e170SRuslan Ermilov.Sh EXIT STATUS
91fdc1ec36SRuslan Ermilov.Ex -std
92cc223804STom Rhodes.Sh SEE ALSO
93cc223804STom Rhodes.Xr setlocale 3
94*6b8910e4SGreg Lehey.Sh STANDARDS
95*6b8910e4SGreg LeheyThe
96*6b8910e4SGreg Lehey.Nm
97*6b8910e4SGreg Leheyutility conforms to
98*6b8910e4SGreg Lehey.St -p1003.1-2004 .
99*6b8910e4SGreg LeheyThe
100*6b8910e4SGreg Lehey.Ev LC_CTYPE ,
101*6b8910e4SGreg Lehey.Ev LC_MESSAGES
102*6b8910e4SGreg Leheyand
103*6b8910e4SGreg Lehey.Ev NLSPATH
104*6b8910e4SGreg Leheyenvironment variables are not interpreted.
10510efe9a9SAlexey Zelkin.Sh BUGS
10610efe9a9SAlexey ZelkinSince
10710efe9a9SAlexey Zelkin.Fx
10810efe9a9SAlexey Zelkindoes not support
109fdc1ec36SRuslan Ermilov.Em charmap Ns s
11010efe9a9SAlexey Zelkinin their
111fdc1ec36SRuslan Ermilov.Tn POSIX
1125bd361abSChristian Brueffermeaning,
11310efe9a9SAlexey Zelkin.Nm
1145bd361abSChristian Bruefferemulates the
115fdc1ec36SRuslan Ermilov.Fl m
116fdc1ec36SRuslan Ermilovoption using the CODESETs listing of all available locales.
117