.\" 2008-06-17 Petr Baudis <pasky@suse.cz>
.\" LC_TIME: Describe first_weekday and first_workday
.\"
-.TH LOCALE 5 2016-03-15 "Linux" "Linux User Manual"
+.TH LOCALE 5 2016-07-17 "Linux" "Linux User Manual"
.SH NAME
locale \- describes a locale definition file
.SH DESCRIPTION
The locale definition file starts with a header that may consist
of the following keywords:
.TP
-.I <escape_char>
+.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 the backslash (\\).
.TP
-.I <comment_char>
+.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 number sign (#).
can be defined from scratch.
If the category should be copied,
the only valid keyword in the definition is
-.B copy
+.I copy
followed by the name of the locale in double quotes which should be
copied.
The exceptions for this rule are
and
.B LC_CTYPE
where a
-.B copy
+.I copy
statement can be followed by locale-specific rules and selected overrides.
.PP
When defining a category from scratch, all field descriptors and strings
See
.BR locale (7)
for a more detailed description of each category.
-.\"
+
.SS LC_ADDRESS
The definition starts with the string
.I LC_ADDRESS
in the first column.
The following keywords are allowed:
-.\" Thanks to the kind folk who wrote localedata/locales/uk_UA
+.\" From localedata/locales/uk_UA
.TP
.I postal_fmt
followed by a string containing field descriptors that define
Floor number.
.TP
%C
-Country designation, from the <country_post> keyword.
+Country designation, from the
+.I country_post
+keyword.
.TP
%l
Local township within town or city (since glibc 2.24).
.I country_name
followed by the country name in the language of the current document
(e.g., "Deutschland" for the
-.IR de_DE
+.B de_DE
locale).
.TP
.I country_post
followed by the numeric country code as plain numbers (ISO 3166).
.TP
.I country_car
-followed by the code for the country car number.
+followed by the international licence plate country code.
.TP
.I country_isbn
followed by the ISBN code (for books).
definition ends with the string
.IR "END LC_CTYPE" .
.SS LC_COLLATE
-Due to limitations of glibc not all POSIX-options are implemented.
+Note that glibc does not support all POSIX-defined options,
+only the options described below are supported (as of glibc 2.23).
The definition starts with the string
.I LC_COLLATE
in the first column.
The following keywords are allowed:
-.\" FIXME The following LC_COLLATE keywords are not documented:
-.\" reorder-after
-.\" reorder-end
-.\" reorder-sections-after
-.\" reorder-sections-end
-.\" script
-.\" symbol-equivalence
+.TP
+.I coll_weight_max
+followed by the number representing used collation levels.
+This keyword is recognized but ignored by glibc.
.TP
.I collating-element
followed by the definition of a collating-element symbol
.I collating-symbol
followed by the definition of a collating symbol
that can be used in collation order statements.
+.TP
+.I define
+followed by
+.B string
+to be evaluated in an
+.I ifdef
+.B string
+/
+.I else
+/
+.I endif
+construct.
+.TP
+.I reorder-after
+followed by a redefinition of a collation rule.
+.TP
+.I reorder-end
+marks the end of the redefinition of a collation rule.
+.TP
+.I reorder-sections-after
+followed by a script name to reorder listed scripts after.
+.TP
+.I reorder-sections-end
+marks the end of the reordering of sections.
+.TP
+.I script
+followed by a declaration of a script.
+.TP
+.I symbol-equivalence
+followed by a collating-symbol to be equivalent to another defined
+collating-symbol.
.PP
-The order-definition starts with a line:
+The collation rule definition starts with a line:
.TP
.I order_start
followed by a list of keywords chosen from
.BR backward ,
or
.BR position .
-The order definition consists of lines that describe the order
-and is terminated with the keyword
+The order definition consists of lines that describe the collation
+order and is terminated with the keyword
.IR order_end .
.PP
The
to which this document applies.
.TP
.I audience
-followed by a description of the audience for which this document is intended.
+followed by a description of the audience for which this document is
+intended.
.TP
.I application
followed by a description of any special application
.TP
.I int_p_cs_precedes
followed by an integer that indicates the placement of
-.I int_currency_symbol
+.I int_curr_symbol
for a nonnegative internationally formatted monetary quantity.
The same values are recognized as for
.IR p_cs_precedes .
.TP
.I int_n_cs_precedes
followed by an integer that indicates the placement of
-.I int_currency_symbol
+.I int_curr_symbol
for a negative internationally formatted monetary quantity.
The same values are recognized as for
.IR p_cs_precedes .
.TP
.I int_p_sep_by_space
followed by an integer that indicates the separation of
-.IR int_currency_symbol ,
+.IR int_curr_symbol ,
the sign string,
and the value for a nonnegative internationally formatted monetary quantity.
The same values are recognized as for
.TP
.I int_n_sep_by_space
followed by an integer that indicates the separation of
-.IR int_currency_symbol ,
+.IR int_curr_symbol ,
the sign string,
and the value for a negative internationally formatted monetary quantity.
The same values are recognized as for
followed by a string containing field descriptors that define
the format used for names in the locale.
The following field descriptors are recognized:
-.\" From localedata/locales/uk_UA:
+.\" From localedata/locales/uk_UA
.RS
.TP 4
%f
See NOTES.
.TP
.I cal_direction
-.\" from localedata/locales/uk_UA
+.\" From localedata/locales/uk_UA
followed by a plain number value that indicates the direction for the
display of calendar dates, as follows:
.RS
.I /usr/share/i18n/locales
Usual default path for locale definition files.
.SH CONFORMING TO
-POSIX.2, ISO/IEC TR 14652.
+POSIX.2.
.SH NOTES
The collective GNU C library community wisdom regarding
.IR abday ,