diff options
Diffstat (limited to 'man5/locale.5')
-rw-r--r-- | man5/locale.5 | 576 |
1 files changed, 576 insertions, 0 deletions
diff --git a/man5/locale.5 b/man5/locale.5 new file mode 100644 index 000000000..836663af2 --- /dev/null +++ b/man5/locale.5 @@ -0,0 +1,576 @@ +.\" 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. +.\" +.TH LOCALE 5 1994-11-09 "National Language Support" "Linux User Manual" +.SH NAME +locale \- Describes a locale definition file +.SH DESCRIPTION +The +.B locale +definition files contains all the information that the +.BR localedef (1) +command needs to convert it into the binary locale database. + +The definition files consist of sections which each describe a +locale category in detail. +.SH SYNTAX +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 +the backslash ( +.B \\\\ +). +.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 +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, +the only valid keyword in the definition is +.B copy +followed by the name of the locale which should be copied. + +.SS LC_CTYPE +The definition for the +.B LC_CTYPE +category starts with the string +.I LC_CTYPE +in the first column. + +There are the following keywords allowed: + +.TP +.I upper +followed by a list of uppercase letters. The letters +.B A +trough +.B Z +are included automatically. Characters also specified as +.BR cntrl , +.BR digit , +.BR punct , +or +.B space +are not allowed. + +.TP +.I lower +followed by a list of lowercase letters. The letters +.B a +trough +.B z +are included automatically. Characters also specified as +.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 +.B upper +or +.B lower +are automatically included. Characters also specified as +.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 +trough +.B 9 +are allowed. They are included by default in this class. + +.TP +.I space +followed by a list of characters defined as white-space +characters. Characters also specified as +.BR upper , +.BR lower , +.BR alpha , +.BR digit , +.BR graph , +or +.B xdigit +are not allowed. The characters +.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 +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 +.BR upper , +.BR lower , +.BR alpha , +.BR digit , +.BR xdigit , +and +.B punct +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 +.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 +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 +.BR blank . +The characters +.B <space> +and +.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 +.B , +and enclosed in parentheses. The members of the list are separated +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 +toupper list is used. + +.PP +The +.B LC_CTYPE +definition ends with the string +.I END LC_CYTPE. + +.SS LC_COLLATE +The +.B LC_COLLATE +category defines the rules for collating characters. Due to +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 +.B forward, +.B backward, +or +.B position. +The order definition consists of lines that describe the order +and is terminated with the keyword +.TP +.I order_end. +.PP + +For more details see the sources in +.B /usr/lib/nls/src +notably the examples +.B POSIX, +.B Example +and +.B Example2 + +.PP +The +.B LC_COLLATE +definition ends with the string +.I END LC_COLLATE. + +.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 +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. +.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 +.B int_curr_symbol. +.TP +.I frac_digits +followed by the number of fractional digits that should be used when +formatting with the +.B currency_symbol. +.TP +.I p_cs_precedes +followed by an integer set to +.B 1 +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. +.TP +.B 2 +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 +- the symbol succeeds the value. +.TP +.B 1 +- the symbol precedes the value. +.RE +.TP +.I n_sep_by_space +An integer set to +.B 0 +if no space separates the +.I currency_symbol +or +.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 +.I currency_symbol +or +.I int_curr_symbol. +.TP +.B 1 +The sign string precedes the quantity and the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 2 +The sign string succeeds the quantity and the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 3 +The sign string precedes the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 4 +The sign string succeeds the +.I currency_symbol +or the +.I int_curr_symbol. +.RE +.TP +.I n_sign_posn +.RS +.TP +.B 0 +Parentheses enclose the quantity and the +.I currency_symbol +or +.I int_curr_symbol. +.TP +.B 1 +The sign string precedes the quantity and the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 2 +The sign string succeeds the quantity and the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 3 +The sign string precedes the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 4 +The sign string succeeds the +.I currency_symbol +or the +.I int_curr_symbol. +.RE +.PP +The +.B LC_MONETARY +definition ends with the string +.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. +.PP +The +.B LC_NUMERIC +definition ends with the string +.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 +Sunday or its translation. +.TP +.I day +followed by a list of weekday names. The list starts with Sunday. +.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 +.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 +.B LC_TIME +definition ends with the string +.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. +.TP +.I noexpr +followed by a regular expression that describes possible +no-responses. + +.PP +The +.B LC_MESSAGES +definition ends with the string +.I END LC_MESSAGES. + +See the POSIX.2 standard for details. +.SH FILES +/usr/lib/locale/ +\- database for the current locale setting of that category +.br +/usr/lib/nls/charmap/* \- charmap-files +.SH BUGS +The manpage isn't complete. +.\" .SH AUTHOR +.\" Jochen Hein (Hein@Student.TU-Clausthal.de) +.SH "CONFORMING TO" +POSIX.2 +.SH "SEE ALSO" +.BR locale (1), +.BR localedef (1), +.BR localeconv (3), +.BR setlocale (3), +.BR charmap (5) |