]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man5/locale.5
user_namespaces.7: ffix
[thirdparty/man-pages.git] / man5 / locale.5
index b2dcefc1b8d0ec9a95d258b879fb8c3e3ab2d9af..3fff4f1ef07077e4d2beb8a92918a15be7a28d43 100644 (file)
@@ -22,7 +22,7 @@
 .\" 2008-06-17 Petr Baudis <pasky@suse.cz>
 .\"     LC_TIME: Describe first_weekday and first_workday
 .\"
-.TH LOCALE 5 2015-01-22 "Linux" "Linux User Manual"
+.TH LOCALE 5 2016-07-17 "Linux" "Linux User Manual"
 .SH NAME
 locale \- describes a locale definition file
 .SH DESCRIPTION
@@ -34,17 +34,20 @@ command needs to convert it into the binary locale database.
 
 The definition files consist of sections which each describe a
 locale category in detail.
+See
+.BR locale (7)
+for additional details for these categories.
 .SS Syntax
 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 (#).
@@ -54,7 +57,7 @@ Each part can be copied from another existing locale or
 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
@@ -62,8 +65,8 @@ The exceptions for this rule are
 and
 .B LC_CTYPE
 where a
-.B copy
-statement can be followed by locale specific rules and selected overrides.
+.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
 should be defined as Unicode code points in angle brackets, unless
@@ -114,29 +117,24 @@ for a more detailed description of each category.
 
 .SS LC_ADDRESS
 The definition starts with the string
-.B LC_ADDRESS
+.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
 the format used for postal addresses in the locale.
 The following field descriptors are recognized:
-.\" From localedata/locales/uk_UA:
 .RS
-.\" .TP
-.\" %n
-.\"    BUG: %l escape sequence from ISO/IEC 14652:2002 is not supported
-.\"    by glibc
-.\" Person's name, possibly constructed with the
-.\" .B LC_NAME
-.\" .I name_fmt
-.\" keyword.
-.\"
-.\" https://sourceware.org/bugzilla/show_bug.cgi?id=16983
 .TP
+%n
+Person's name, possibly constructed with the
+.B LC_NAME
+.I name_fmt
+keyword (since glibc 2.24).
+.TP 4
 %a
 Care of person, or organization.
 .TP
@@ -170,14 +168,12 @@ Room number, door designation.
 Floor number.
 .TP
 %C
-Country designation, from the <country_post> keyword.
-.\" .TP
-.\" %l
-.\"     BUG: %l escape sequence from ISO/IEC 14652:2002 is not
-.\"    supported by glibc
-.\" Local township within town or city.
-.\"
-.\" https://sourceware.org/bugzilla/show_bug.cgi?id=16983
+Country designation, from the
+.I country_post
+keyword.
+.TP
+%l
+Local township within town or city (since glibc 2.24).
 .TP
 %z
 Zip number, postal code.
@@ -196,12 +192,11 @@ the \(aq%\(aq to specify that the
 information is taken from a Romanized version string of the
 entity.
 .RE
-
 .TP
 .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
@@ -217,7 +212,7 @@ followed by the three-letter abbreviation of the country (ISO 3166).
 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).
@@ -245,7 +240,7 @@ definition ends with the string
 .IR "END LC_ADDRESS" .
 .SS LC_CTYPE
 The definition starts with the string
-.B LC_CTYPE
+.I LC_CTYPE
 in the first column.
 
 The following keywords are allowed:
@@ -416,6 +411,10 @@ and
 .B <tab>
 are automatically included.
 .TP
+.I charclass
+followed by a list of locale-specific character class names
+which are then to be defined in the locale.
+.TP
 .I toupper
 followed by a list of mappings from lowercase to uppercase
 letters.
@@ -432,7 +431,7 @@ letters.
 If the keyword tolower is not present, the reverse of the
 toupper list is used.
 .TP
-.I map "totitle"
+.I map totitle
 followed by a list of mapping pairs of
 characters and letters
 to be used in titles (headings).
@@ -442,12 +441,8 @@ followed by a locale-specific character class definition,
 starting with the class name followed by the characters
 belonging to the class.
 .TP
-.I charclass
-followed by a list of locale-specific character class names
-which are then to be defined in the locale.
-.TP
 .I charconv
-followed by a list of locale-specific character map names
+followed by a list of locale-specific character mapping names
 which are then to be defined in the locale.
 .TP
 .I outdigit
@@ -468,7 +463,7 @@ marks the start of the transliteration rules section.
 The section can contain the
 .I include
 keyword in the beginning followed by
-locale specific rules and overrides.
+locale-specific rules and overrides.
 Any rule specified in the locale file
 will override any rule
 copied or included from other files.
@@ -485,12 +480,11 @@ character will be used instead.
 .I include
 in the transliteration rules section includes
 a transliteration rule file
-(and optionally a repertoire map file)
-.
+(and optionally a repertoire map file).
 .TP
 .I default_missing
-in the transliteration rules section 
-defines the default character to be used for 
+in the transliteration rules section
+defines the default character to be used for
 transliteration where none of the targets cannot be presented
 in the target character set.
 .TP
@@ -502,16 +496,18 @@ The
 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
-.B LC_COLLATE
+.I LC_COLLATE
 in the first column.
 
 The following keywords are allowed:
-.\" FIXME The following LC_COLLATE keywords are not documented:
-.\"    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
@@ -520,8 +516,39 @@ representing a multicharacter collating element.
 .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
@@ -529,14 +556,9 @@ 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 .
-.\" FIXME The following LC_COLLATE keywords are not documented:
-.\"    reorder-after
-.\"    reorder-end
-.\"    reorder-sections-after
-.\"    reorder-sections-end
 .PP
 The
 .B LC_COLLATE
@@ -544,7 +566,7 @@ definition ends with the string
 .IR "END LC_COLLATE" .
 .SS LC_IDENTIFICATION
 The definition starts with the string
-.B LC_IDENTIFICATION
+.I LC_IDENTIFICATION
 in the first column.
 
 The values in this category are defined as plain strings.
@@ -572,10 +594,14 @@ organization that maintains this document.
 .I tel
 followed by the telephone number (in international format)
 of the organization that maintains this document.
+As of glibc 2.24, this keyword is deprecated in favor of
+other contact methods.
 .TP
 .I fax
 followed by the fax number (in international format)
 of the organization that maintains this document.
+As of glibc 2.24, this keyword is deprecated in favor of
+other contact methods.
 .TP
 .I language
 followed by the name of the language to which this document applies.
@@ -585,15 +611,15 @@ followed by the name of the country/geographic extent
 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
 for which this document is intended.
 .TP
 .I abbreviation
-.\" as far as I can tell... (mtk)
-followed by the short name for this document.
+followed by the short name for provider of the source of this document.
 .TP
 .I revision
 followed by the revision number of this document.
@@ -620,7 +646,7 @@ definition ends with the string
 .IR "END LC_IDENTIFICATION" .
 .SS LC_MESSAGES
 The definition starts with the string
-.B LC_MESSAGES
+.I LC_MESSAGES
 in the first column.
 
 The following keywords are allowed:
@@ -645,7 +671,7 @@ definition ends with the string
 .IR "END LC_MESSAGES" .
 .SS LC_MEASUREMENT
 The definition starts with the string
-.B LC_MEASUREMENT
+.I LC_MEASUREMENT
 in the first column.
 
 The following keywords are allowed:
@@ -654,7 +680,7 @@ The following keywords are allowed:
 followed by number identifying the standard used for measurement.
 The following values are recognized:
 .RS
-.TP
+.TP 4
 .B 1
 Metric.
 .TP
@@ -668,7 +694,7 @@ definition ends with the string
 .IR "END LC_MEASUREMENT" .
 .SS LC_MONETARY
 The definition starts with the string
-.B LC_MONETARY
+.I LC_MONETARY
 in the first column.
 
 Values for
@@ -731,7 +757,7 @@ followed by an integer that indicates the placement of
 .I currency_symbol
 for a nonnegative formatted monetary quantity:
 .RS
-.TP
+.TP 4
 .B 0
 the symbol succeeds the value.
 .TP
@@ -739,34 +765,13 @@ the symbol succeeds the value.
 the symbol precedes the value.
 .RE
 .TP
-.I n_cs_precedes
-followed by an integer that indicates the placement of
-.I currency_symbol
-for a negative formatted monetary quantity.
-The same values are recognized as for
-.IR p_cs_precedes .
-.TP
-.I int_p_cs_precedes
-followed by an integer that indicates the placement of
-.I int_currency_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
-for a negative internationally formatted monetary quantity.
-The same values are recognized as for
-.IR p_cs_precedes .
-.TP
 .I p_sep_by_space
 followed by an integer that indicates the separation of
 .IR currency_symbol ,
 the sign string, and the value for a nonnegative formatted monetary quantity.
 The following values are recognized:
 .RS
-.TP
+.TP 4
 .B 0
 No space separates the currency symbol and the value.
 .TP
@@ -781,6 +786,13 @@ a space separates them from the value;
 otherwise a space separates the sign string and the value.
 .RE
 .TP
+.I n_cs_precedes
+followed by an integer that indicates the placement of
+.I currency_symbol
+for a negative formatted monetary quantity.
+The same values are recognized as for
+.IR p_cs_precedes .
+.TP
 .I n_sep_by_space
 followed by an integer that indicates the separation of
 .IR currency_symbol ,
@@ -788,28 +800,12 @@ the sign string, and the value for a negative formatted monetary quantity.
 The same values are recognized as for
 .IR p_sep_by_space .
 .TP
-.I int_p_sep_by_space
-followed by an integer that indicates the separation of
-.IR int_currency_symbol ,
-the sign string,
-and the value for a nonnegative internationally formatted monetary quantity.
-The same values are recognized as for
-.IR p_sep_by_space .
-.TP
-.I int_n_sep_by_space
-followed by an integer that indicates the separation of
-.IR int_currency_symbol ,
-the sign string,
-and the value for a negative internationally formatted monetary quantity.
-The same values are recognized as for
-.IR p_sep_by_space .
-.TP
 .I p_sign_posn
 followed by an integer that indicates where the
 .I positive_sign
 should be placed for a nonnegative monetary quantity:
 .RS
-.TP
+.TP 4
 .B 0
 Parentheses enclose the quantity and the
 .I currency_symbol
@@ -848,6 +844,36 @@ should be placed for a negative monetary quantity.
 The same values are recognized as for
 .IR p_sign_posn .
 .TP
+.I int_p_cs_precedes
+followed by an integer that indicates the placement of
+.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_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_curr_symbol ,
+the sign string,
+and the value for a nonnegative internationally formatted monetary quantity.
+The same values are recognized as for
+.IR p_sep_by_space .
+.TP
+.I int_n_sep_by_space
+followed by an integer that indicates the separation of
+.IR int_curr_symbol ,
+the sign string,
+and the value for a negative internationally formatted monetary quantity.
+The same values are recognized as for
+.IR p_sep_by_space .
+.TP
 .I int_p_sign_posn
 followed by an integer that indicates where the
 .I positive_sign
@@ -870,7 +896,7 @@ definition ends with the string
 .IR "END LC_MONETARY" .
 .SS LC_NAME
 The definition starts with the string
-.B LC_NAME
+.I LC_NAME
 in the first column.
 
 Various keywords are allowed, but only
@@ -884,9 +910,9 @@ The allowed keywords are as follows:
 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
+.TP 4
 %f
 Family name(s).
 .TP
@@ -958,7 +984,7 @@ definition ends with the string
 .IR "END LC_NAME" .
 .SS LC_NUMERIC
 The definition starts with the string
-.B LC_NUMERIC
+.I LC_NUMERIC
 in the first column.
 
 The following keywords are allowed:
@@ -990,7 +1016,7 @@ definition ends with the string
 .IR "END LC_NUMERIC" .
 .SS LC_PAPER
 The definition starts with the string
-.B LC_PAPER
+.I LC_PAPER
 in the first column.
 
 Values in this category are defined as plain numbers.
@@ -1009,7 +1035,7 @@ definition ends with the string
 .IR "END LC_PAPER" .
 .SS LC_TELEPHONE
 The definition starts with the string
-.B LC_TELEPHONE
+.I LC_TELEPHONE
 in the first column.
 
 The following keywords are allowed:
@@ -1020,7 +1046,7 @@ the format used to dial international numbers.
 The following field descriptors are recognized:
 .\" From localedata/locales/uk_UA
 .RS
-.TP
+.TP 4
 %a
 Area code without nationwide prefix (the prefix is often "00").
 .TP
@@ -1062,16 +1088,10 @@ definition ends with the string
 .IR "END LC_TELEPHONE" .
 .SS LC_TIME
 The definition starts with the string
-.B LC_TIME
+.I LC_TIME
 in the first column.
 
 The following keywords are allowed:
-.\" FIXME The following LC_TIME keywords are not documented:
-.\"    era
-.\"    era_d_fmt
-.\"    era_d_t_fmt
-.\"    era_t_fmt
-.\"    timezone
 .TP
 .I abday
 followed by a list of abbreviated names of the days of the week.
@@ -1095,6 +1115,21 @@ followed by a list of abbreviated month names.
 .I mon
 followed by a list of month names.
 .TP
+.I d_t_fmt
+followed by the appropriate date and time format
+(for syntax, see
+.BR strftime (3)).
+.TP
+.I d_fmt
+followed by the appropriate date format
+(for syntax, see
+.BR strftime (3)).
+.TP
+.I t_fmt
+followed by the appropriate time format
+(for syntax, see
+.BR strftime (3)).
+.TP
 .I am_pm
 followed by the appropriate representation of the
 .B am
@@ -1103,18 +1138,98 @@ and
 strings.
 This should be left empty for locales not using AM/PM convention.
 .TP
-.I d_t_fmt
-followed by the appropriate date and time format.
+.I t_fmt_ampm
+followed by the appropriate time format
+(for syntax, see
+.BR strftime (3))
+when using 12h clock format.
+This should be left empty for locales not using AM/PM convention.
 .TP
-.I d_fmt
-followed by the appropriate date format.
+.I era
+followed by semicolon-separated strings that define how years are
+counted and displayed for each era in the locale.
+Each string has the following format:
+.RS
+.PP
+.IR direction ":" offset ":" start_date ":" end_date ":" era_name ":" era_format
+.PP
+The fields are to be defined as follows:
+.PP
+.TP 4
+.I direction
+Either
+.BR +
+or
+.BR -.
+.BR +
+means the years closer to
+.IR start_date
+have lower numbers than years closer to
+.IR end_date .
+.BR -
+means the opposite.
+.TP
+.I offset
+The number of the year closest to
+.IR start_date
+in the era, corresponding to the
+.IR %Ey
+descriptor (see
+.BR strptime (3)).
+.TP
+.I start_date
+The start of the era in the form of
+.IR yyyy/mm/dd .
+Years prior AD 1 are represented as negative numbers.
+.TP
+.I end_date
+The end of the era in the form of
+.IR yyyy/mm/dd ,
+or one of the two special values of
+.BR -*
+or
+.BR +* .
+.BR -*
+means the ending date is the beginning of time.
+.BR +*
+means the ending date is the end of time.
+.TP
+.I era_name
+The name of the era corresponding to the
+.I %EC
+descriptor (see
+.BR strptime (3)).
+.TP
+.I era_format
+The format of the year in the era corresponding to the
+.I %EY
+descriptor (see
+.BR strptime (3)).
+.RE
 .TP
-.I t_fmt
-followed by the appropriate time format.
+.I era_d_fmt
+followed by the format of the date in alternative era notation,
+corresponding to the
+.I %Ex
+descriptor (see
+.BR strptime (3)).
+.TP
+.I era_t_fmt
+followed by the format of the time in alternative era notation,
+corresponding to the
+.I %EX
+descriptor (see
+.BR strptime (3)).
+.TP
+.I era_d_t_fmt
+followed by the format of the date and time in alternative era notation,
+corresponding to the
+.I %Ec
+descriptor (see
+.BR strptime (3)).
 .TP
-.I t_fmt_ampm
-followed by the appropriate time format when using 12h clock format.
-This should be left empty for locales not using AM/PM convention.
+.I alt_digits
+followed by the alternative digits used for date and time in the locale.
 .TP
 .I week
 followed by a list of three values as plain numbers:
@@ -1150,11 +1265,11 @@ The default value is
 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
-.TP
+.TP 4
 .B 1
 Left-right from top.
 .TP
@@ -1167,10 +1282,9 @@ Right-left from top.
 .TP
 .I date_fmt
 followed by the appropriate date representation for
-.BR date (1).
-.TP
-.I alt_digits
-followed by the alternative digits used for date and time in the locale.
+.BR date (1)
+(for syntax, see
+.BR strftime (3)).
 .PP
 The
 .B LC_TIME
@@ -1184,7 +1298,7 @@ Usual default locale archive location.
 .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 ,
@@ -1231,16 +1345,17 @@ or
 .BR 2 ,
 depending on whether the week and work week actually starts on Sunday or
 Monday for the locale.
-.SH BUGS
-This manual page isn't complete.
 .\" .SH AUTHOR
 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)
 .SH SEE ALSO
+.BR iconv (1),
 .BR locale (1),
 .BR localedef (1),
 .BR localeconv (3),
 .BR newlocale (3),
 .BR setlocale (3),
+.BR strftime (3),
+.BR strptime (3),
 .BR uselocale (3),
 .BR charmap (5),
 .BR charsets (7),