man-pages/man5/locale.5

576 lines
11 KiB
Groff
Raw Normal View History

2004-11-03 13:51:07 +00:00
.\" Hey Emacs, this is -*- nroff -*-
.\"
.\" This file is part of locale(1) which displays the settings of the
.\" current locale.
.\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de)
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
.\"
2007-05-18 10:09:18 +00:00
.TH LOCALE 5 1994-11-09 "Linux" "Linux User Manual"
2004-11-03 13:51:07 +00:00
.SH NAME
locale \- Describes a locale definition file
.SH DESCRIPTION
The
2004-11-03 13:51:07 +00:00
.B locale
definition files contains all the information that the
.BR localedef (1)
2004-11-03 13:51:07 +00:00
command needs to convert it into the binary locale database.
The definition files consist of sections which each describe a
locale category in detail.
2007-05-21 12:56:30 +00:00
.SS Syntax
2004-11-03 13:51:07 +00:00
The locale definition file starts with a header that may consist
of the following keywords:
.TP
.I <escape_char>
is followed by a character that should be used as the
escape-character for the rest of the file to mark characters that
should be interpreted in a special way.
It defaults to
2004-11-03 13:51:07 +00:00
the backslash (
.B \\\\
2004-11-03 13:51:07 +00:00
).
.TP
.I <comment_char>
is followed by a character that will be used as the
comment-character for the rest of the file.
It defaults to the
2004-11-03 13:51:07 +00:00
number sign (#).
.PP
The locale definition has one part for each locale category.
Each part can be copied from another existing locale or
can be defined from scratch.
If the category should be copied,
2004-11-03 13:51:07 +00:00
the only valid keyword in the definition is
.B copy
followed by the name of the locale which should be copied.
2006-02-07 22:39:18 +00:00
.\" FIXME glibc 2.2.2 added new non-standard locale categories:
.\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME,
.\" LC_PAPER, LC_TELEPHONE. These need to be documented.
2004-11-03 13:51:07 +00:00
.SS LC_CTYPE
The definition for the
2004-11-03 13:51:07 +00:00
.B LC_CTYPE
category starts with the string
.I LC_CTYPE
2004-11-03 13:51:07 +00:00
in the first column.
There are the following keywords allowed:
.TP
.I upper
followed by a list of uppercase letters.
The letters
2004-11-03 13:51:07 +00:00
.B A
trough
.B Z
are included automatically.
Characters also specified as
2004-11-03 13:51:07 +00:00
.BR cntrl ,
.BR digit ,
.BR punct ,
or
.B space
are not allowed.
.TP
.I lower
followed by a list of lowercase letters.
The letters
2004-11-03 13:51:07 +00:00
.B a
trough
.B z
are included automatically.
Characters also specified as
2004-11-03 13:51:07 +00:00
.BR cntrl ,
.BR digit ,
.BR punct ,
or
.B space
are not allowed.
.TP
.I alpha
followed by a list of letters.
All character specified as either
2004-11-03 13:51:07 +00:00
.B upper
or
2004-11-03 13:51:07 +00:00
.B lower
are automatically included.
Characters also specified as
2004-11-03 13:51:07 +00:00
.BR cntrl ,
.BR digit ,
.BR punct ,
or
.B space
are not allowed.
.TP
.I digit
followed by the characters classified as numeric digits.
Only the
digits
.B 0
2004-11-03 13:51:07 +00:00
trough
.B 9
are allowed.
They are included by default in this class.
2004-11-03 13:51:07 +00:00
.TP
.I space
followed by a list of characters defined as white-space
characters.
Characters also specified as
2004-11-03 13:51:07 +00:00
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR graph ,
or
.B xdigit
are not allowed.
The characters
2004-11-03 13:51:07 +00:00
.BR <space> ,
.BR <form-feed> ,
.BR <newline> ,
.BR <carriage-return> ,
.BR <tab> ,
and
.B <vertical-tab>
are automatically included.
.TP
.I cntrl
followed by a list of control characters.
Characters also specified as
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR punct ,
.BR graph ,
.BR print ,
or
.B xdigit
are not allowed.
.TP
.I punct
followed by a list of punctuation characters.
Characters also
2004-11-03 13:51:07 +00:00
specified as
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR cntrl ,
.BR xdigit ,
or the
.B <space>
character are not allowed.
.TP
.I graph
followed by a list of printable characters, not including the
.B <space>
character.
The characters defined as
2004-11-03 13:51:07 +00:00
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR xdigit ,
and
.B punct
2004-11-03 13:51:07 +00:00
are automatically included.
Characters also specified as
.B cntrl
are not allowed.
.TP
.I print
followed by a list of printable characters, including the
.B <space>
character.
The characters defined as
2004-11-03 13:51:07 +00:00
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR xdigit ,
.BR punct ,
and the
.B <space>
character are automatically included.
Characters also specified as
.B cntrl
are not allowed.
.TP
.I xdigit
followed by a list of characters classified as hexadecimal
digits.
The decimal digits must be included followed by one or
more set of six characters in ascending order.
The following
2004-11-03 13:51:07 +00:00
characters are included by default:
.B 0
trough
.BR 9 ,
.B a
trough
.BR f ,
.B A
trough
.BR F .
.TP
.I blank
followed by a list of characters classified as
2004-11-03 13:51:07 +00:00
.BR blank .
The characters
.B <space>
and
2004-11-03 13:51:07 +00:00
.B <tab>
are automatically included.
.TP
.I toupper
followed by a list of mappings from lowercase to uppercase
letters.
Each mapping is a pair of a lowercase and an uppercase letter
separated with a
2004-11-03 13:51:07 +00:00
.B ,
and enclosed in parentheses.
The members of the list are separated
2004-11-03 13:51:07 +00:00
with semicolons.
.TP
.I tolower
followed by a list of mappings from uppercase to lowercase
letters.
If the keyword tolower is not present, the reverse of the
2004-11-03 13:51:07 +00:00
toupper list is used.
.PP
The
2004-11-03 13:51:07 +00:00
.B LC_CTYPE
definition ends with the string
2004-11-03 13:51:07 +00:00
.I END LC_CYTPE.
.SS LC_COLLATE
The
.B LC_COLLATE
category defines the rules for collating characters.
Due to
2004-11-03 13:51:07 +00:00
limitations of libc not all POSIX-options are implemented.
The definition starts with the string
.B LC_COLLATE
in the first column.
There are the following keywords allowed:
.TP
.I collating-element
.TP
.I collating-symbol
.PP
The order-definition starts with a line:
.TP
.I order_start
.PP
followed by a list of keywords out of
2005-07-19 15:36:19 +00:00
.BR forward ,
.BR backward ,
2004-11-03 13:51:07 +00:00
or
2005-07-19 15:36:19 +00:00
.BR position .
2004-11-03 13:51:07 +00:00
The order definition consists of lines that describe the order
and is terminated with the keyword
.TP
2005-07-19 15:36:19 +00:00
.IR order_end .
2004-11-03 13:51:07 +00:00
.PP
For more details see the sources in
2005-11-02 13:55:25 +00:00
.I /usr/lib/nls/src
2004-11-03 13:51:07 +00:00
notably the examples
2005-07-19 15:36:19 +00:00
.BR POSIX ,
2004-11-03 13:51:07 +00:00
.B Example
and
2004-11-03 13:51:07 +00:00
.B Example2
.PP
The
2004-11-03 13:51:07 +00:00
.B LC_COLLATE
definition ends with the string
2005-07-19 15:36:19 +00:00
.IR END LC_COLLATE .
2004-11-03 13:51:07 +00:00
.SS LC_MONETARY
The definition starts with the string
.B LC_MONETARY
in the first column.
There are the following keywords allowed:
.TP
.I int_curr_symbol
followed by the international currency symbol.
This must be a
2004-11-03 13:51:07 +00:00
4-character string containing the international currency symbol as
defined by the ISO 4217 standard (three characters) followed by a
separator.
.TP
.I currency_symbol
followed by the local currency symbol.
.TP
.I mon_decimal_point
followed by the string that will be used as the decimal delimiter
when formatting monetary quantities.
.TP
.I mon_thousands_sep
followed by the string that will be used as a group separator
when formatting monetary quantities.
.TP
.I mon_grouping
followed by a string that describes the formatting of numeric
quantities.
2004-11-03 13:51:07 +00:00
.TP
.I positive_sign
followed by a string that is used to indicate a positive sign for
monetary quantities.
.TP
.I negative_sign
followed by a string that is used to indicate a negative sign for
monetary quantities.
.TP
.I int_frac_digits
followed by the number of fractional digits that should be used when
formatting with the
2005-07-19 15:36:19 +00:00
.BR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.I frac_digits
followed by the number of fractional digits that should be used when
formatting with the
2005-07-19 15:36:19 +00:00
.BR currency_symbol .
2004-11-03 13:51:07 +00:00
.TP
.I p_cs_precedes
followed by an integer set to
.B 1
2004-11-03 13:51:07 +00:00
if the
.I currency_symbol
or
.I int_curr_symbol
should precede the formatted monetary quantity or set to
.B 0
if the symbol succeeds the value.
.TP
.I p_sep_by_space
followed by an integer.
.RS
.TP
.B 0
means that no space should be printed between the symbol and the
value.
.TP
.B 1
means that a space should be printed between the symbol and the
value.
2004-11-03 13:51:07 +00:00
.TP
.B 2
2004-11-03 13:51:07 +00:00
means that a space should be printed between the symbol and the
sign string, if adjacent.
.RE
.TP
.I n_cs_precedes
.RS
.TP
.B 0
2004-11-03 13:51:07 +00:00
- the symbol succeeds the value.
.TP
.B 1
- the symbol precedes the value.
.RE
.TP
.I n_sep_by_space
An integer set to
2004-11-03 13:51:07 +00:00
.B 0
if no space separates the
.I currency_symbol
or
2004-11-03 13:51:07 +00:00
.I int_curr_symbol
from the value for a negative monetary quantity, set to
.B 1
if a space separates the symbol from the value and set to
.B 2
if a space separates the symbol and the sign string, if adjacent.
.TP
.I p_sign_posn
.RS
.TP
.B 0
Parentheses enclose the quantity and the
2004-11-03 13:51:07 +00:00
.I currency_symbol
or
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.B 1
The sign string precedes the quantity and the
.I currency_symbol
or the
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.B 2
The sign string succeeds the quantity and the
.I currency_symbol
or the
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.B 3
The sign string precedes the
.I currency_symbol
or the
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.B 4
The sign string succeeds the
.I currency_symbol
or the
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.RE
.TP
.I n_sign_posn
.RS
.TP
.B 0
Parentheses enclose the quantity and the
2004-11-03 13:51:07 +00:00
.I currency_symbol
or
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.B 1
The sign string precedes the quantity and the
.I currency_symbol
or the
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.B 2
The sign string succeeds the quantity and the
.I currency_symbol
or the
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.B 3
The sign string precedes the
.I currency_symbol
or the
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.TP
.B 4
The sign string succeeds the
.I currency_symbol
or the
2005-07-19 15:36:19 +00:00
.IR int_curr_symbol .
2004-11-03 13:51:07 +00:00
.RE
.PP
The
2004-11-03 13:51:07 +00:00
.B LC_MONETARY
definition ends with the string
2004-11-03 13:51:07 +00:00
.I END LC_MONETARY.
.SS LC_NUMERIC
The definition starts with the string
.B LC_NUMERIC
in the first column.
The following keywords are allowed:
.TP
.I decimal_point
followed by the string that will be used as the decimal delimiter
when formatting numeric quantities.
.TP
.I thousands_sep
followed by the string that will be used as a group separator
when formatting numeric quantities.
.TP
.I grouping
followed by a string that describes the formatting of numeric
quantities.
2004-11-03 13:51:07 +00:00
.PP
The
2004-11-03 13:51:07 +00:00
.B LC_NUMERIC
definition ends with the string
2004-11-03 13:51:07 +00:00
.I END LC_NUMERIC.
.SS LC_TIME
The definition starts with the string
.B LC_TIME
in the first column.
The following keywords are allowed:
.TP
.I abday
followed by a list of abbreviated weekday names.
The list starts with
2004-11-03 13:51:07 +00:00
Sunday or its translation.
.TP
.I day
followed by a list of weekday names.
The list starts with Sunday.
2004-11-03 13:51:07 +00:00
.TP
.I abmon
followed by a list of abbreviated month names.
.TP
.I mon
followed by a list of month names.
.TP
.I am_pm
The appropriate representation of the
.B am
and
2004-11-03 13:51:07 +00:00
.B pm
strings.
.TP
.I d_t_fmt
The appropriate date and time format.
.TP
.I d_fmt
The appropriate date format.
.TP
.I t_fmt
The appropriate time format.
.TP
.I t_fmt_ampm
The appropriate time format when using 12h clock format.
.PP
The
2004-11-03 13:51:07 +00:00
.B LC_TIME
definition ends with the string
2004-11-03 13:51:07 +00:00
.I END LC_TIME.
.SS LC_MESSAGES
The definition starts with the string
.B LC_MESSAGES
in the first column.
The following keywords are allowed:
.TP
.I yesexpr
followed by a regular expression that describes possible
yes-responses.
2004-11-03 13:51:07 +00:00
.TP
.I noexpr
followed by a regular expression that describes possible
no-responses.
2004-11-03 13:51:07 +00:00
.PP
The
2004-11-03 13:51:07 +00:00
.B LC_MESSAGES
definition ends with the string
2004-11-03 13:51:07 +00:00
.I END LC_MESSAGES.
See the POSIX.2 standard for details.
.SH FILES
/usr/lib/locale/
2005-07-18 12:43:00 +00:00
\(em database for the current locale setting of that category
2004-11-03 13:51:07 +00:00
.br
2005-07-18 12:43:00 +00:00
/usr/lib/nls/charmap/* \(em charmap-files
.SH "CONFORMING TO"
POSIX.2
2004-11-03 13:51:07 +00:00
.SH BUGS
2007-05-21 12:56:30 +00:00
This manual page isn't complete.
2004-11-03 13:51:07 +00:00
.\" .SH AUTHOR
.\" Jochen Hein (Hein@Student.TU-Clausthal.de)
.SH "SEE ALSO"
.BR locale (1),
.BR localedef (1),
.BR localeconv (3),
.BR setlocale (3),
.BR charmap (5)