.\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de) .\" Copyright (C) 2008 Petr Baudis (pasky@suse.cz) .\" Copyright (C) 2014 Michael Kerrisk .\" .\" %%%LICENSE_START(GPLv2+_SW_3_PARA) .\" 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 manual; if not, see .\" . .\" %%%LICENSE_END .\" .\" 2008-06-17 Petr Baudis .\" LC_TIME: Describe first_weekday and first_workday .\" .TH LOCALE 5 2014-03-03 "Linux" "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. .SS Syntax The locale definition file starts with a header that may consist of the following keywords: .TP .I 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 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. .\" FIXME glibc 2.2.2 added new nonstandard locale categories: .\" LC_ADDRESS, LC_IDENTIFICATION. .\" These need to be documented. .SS Locale category sections The following category sections are defined by POSIX: .IP * 3 .B LC_CTYPE .IP * .B LC_COLLATE .IP * .B LC_MESSAGES .IP * .B LC_MONETARY .IP * .B LC_NUMERIC .IP * .B LC_TIME .PP In addition, since version 2.2, the GNU C library supports the following nonstandard categories: .IP * 3 .B LC_ADDRESS .IP * .B LC_IDENTIFICATION .IP * .B LC_MEASUREMENT .IP * .B LC_NAME .IP * .B LC_PAPER .IP * .B LC_TELEPHONE .SS LC_ADDRESS The definition for the .B LC_ADDRESS category 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 .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. .TP %a Care of person, or organization. .TP %f Firm name. .TP %d Department name. .TP %b Building name. .TP %s Street or block (e.g., Japanese) name. .TP %h House number or designation. .TP %N Insert an end-of-line if the previous descriptor's value was not an empty string; otherwise ignore. .TP %t Insert a space if the previous descriptor's value was not an empty string; otherwise ignore. .TP %r Room number, door designation. .TP %e Floor number. .TP %C Country designation, from the keyword. .\" .TP .\" %l .\" BUG: %l escape sequence from ISO/IEC 14652:2002 is not .\" supported by glibc .\" Local township within town or city. .TP %z Zip number, postal code. .TP %T Town, city. .TP %S State, province, or prefecture. .TP %c Country, as taken from data record. .PP Each field descriptor may have an \(aqR\(aq after 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 locale). .TP .I country_post followed by the abbreviation of the country (see CERT_MAILCODES). .TP .I country_ab2 followed by the two-letter abbreviation of the country (ISO 3166). .TP .I country_ab3 followed by the three-letter abbreviation of the country (ISO 3166). .TP .I country_num followed by the numeric country code (ISO 3166). .TP .I country_car followed by the code for the country car number. .TP .I country_isbn followed by the ISBN code (for books). .TP .I lang_name followed by the language name in the language of the current document. .TP .I lang_ab followed by the two-letter abbreviation of the language (ISO 639). .TP .I lang_term followed by the three-letter abbreviation of the language (ISO 639-2). .TP .I lang_lib followed by the three-letter abbreviation of the language for library use (ISO 639-2) .PP The .B LC_ADDRESS definition ends with the string .IR "END LC_ADDRESS" . .SS LC_CTYPE The definition for the .B LC_CTYPE category starts with the string .I LC_CTYPE in the first column. The following keywords are allowed: .TP .I upper followed by a list of uppercase letters. The letters .B A through .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 through .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 through .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 , .BR , .BR , .BR , .BR , and .B 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 character are not allowed. .TP .I graph followed by a list of printable characters, not including the .B 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 character. The characters defined as .BR upper , .BR lower , .BR alpha , .BR digit , .BR xdigit , .BR punct , and the .B 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 through .BR 9 , .B a through .BR f , .B A through .BR F . .TP .I blank followed by a list of characters classified as .BR blank . The characters .B and .B 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 .IR "END LC_CYTPE" . .SS LC_COLLATE .\" FIXME: the decsription of LC_COLLATE lacks a lot of details 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. The following keywords are 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 chosen from .BR forward , .BR backward , or .BR position . The order definition consists of lines that describe the order and is terminated with the keyword .TP .IR order_end . .PP For more details see the sources in .I /usr/lib/nls/src notably the examples .BR POSIX , .B Example and .B Example2 .PP The .B LC_COLLATE definition ends with the string .IR "END LC_COLLATE" . .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 .IR "END LC_MESSAGES" . .SS LC_MEASUREMENT The definition starts with the string .B LC_MEASUREMENT in the first column. The following keywords are allowed: .TP .I measurement folowed by number identifying the standard used for measurement. The following values are recognized: .RS .TP .B 1 Metric. .TP .B 2 US customary measurements. .RE .PP The .B LC_MEASUREMENT definition ends with the string .IR "END LC_MEASUREMENT" . .SS LC_MONETARY The definition starts with the string .B LC_MONETARY in the first column. The following keywords are llowed: .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 .BR int_curr_symbol . .TP .I frac_digits followed by the number of fractional digits that should be used when formatting with the .BR 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 .IR int_curr_symbol . .TP .B 1 The sign string precedes the quantity and the .I currency_symbol or the .IR int_curr_symbol . .TP .B 2 The sign string succeeds the quantity and the .I currency_symbol or the .IR int_curr_symbol . .TP .B 3 The sign string precedes the .I currency_symbol or the .IR int_curr_symbol . .TP .B 4 The sign string succeeds the .I currency_symbol or the .IR int_curr_symbol . .RE .TP .I n_sign_posn .RS .TP .B 0 Parentheses enclose the quantity and the .I currency_symbol or .IR int_curr_symbol . .TP .B 1 The sign string precedes the quantity and the .I currency_symbol or the .IR int_curr_symbol . .TP .B 2 The sign string succeeds the quantity and the .I currency_symbol or the .IR int_curr_symbol . .TP .B 3 The sign string precedes the .I currency_symbol or the .IR int_curr_symbol . .TP .B 4 The sign string succeeds the .I currency_symbol or the .IR int_curr_symbol . .RE .PP The .B LC_MONETARY definition ends with the string .IR "END LC_MONETARY" . .SS LC_NAME The definition starts with the string .B LC_NAME in the first column. The following keywords are allowed: .TP .I name_fmt 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: .RS .TP %f Family name(s). .TP %F Family names in uppercase. .TP %g First given name. .TP %G First given initial. .TP %l First given name with Latin letters. .TP %o Other shorter name. .TP %m Additional given name(s). .TP %M Initials for additional given name(s). .TP %p Profession. .TP %s Salutation, such as "Doctor". .TP %S Abbreviated salutation, such as "Mr." or "Dr.". .TP %d Salutation, using the FDCC-sets conventions. .\" 1 for the name_gen .\" In glibc 2.19, %d1 is used in only: .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK .\" In glibc 2.19, %d[2-5] appear to be not used at all .\" 2 for name_mr .\" 3 for name_mrs .\" 4 for name_miss .\" 5 for name_ms .TP %t If the preceding field descriptor resulted in an empty string, then the empty string, otherwise a space character. .RE .TP .I name_gen followed by the general salutation for any gender. .TP .I name_mr followed by the salutation for men. .TP .I name_mrs followed by the salutation for married women. .TP .I name_miss followed by the salutation for unmarried women. .TP .I name_ms followed by the salutation valid for all women. .PP The .B LC_NAME definition ends with the string .IR "END LC_NAME" . .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 .IR "END LC_NUMERIC" . .SS LC_PAPER The definition starts with the string .B LC_PAPER in the first column. The following keywords are allowed: .TP .I height followed by the height, in millimeters, of the standard paper format. .TP .I width followed by the width, in millimeters, of the standard paper format. .PP The .B LC_PAPER definition ends with the string .IR "END LC_PAPER" . .SS LC_TELEPHONE The definition starts with the string .B LC_TELEPHONE in the first column. The following keywords are allowed: .TP .I tel_int_fmt followed by a string that contains field descriptors that identify the format used to dial international numbers. The following field descriptors are recognized: .\" From localedata/locales/uk_UA .RS .TP %a Area code without nationwide prefix (the prefix is often "0"). .TP %A Area code including nationwide prefix. .TP %l Local number (within area code). .TP %e Extension (to local number). .TP %c Country code. .TP %C Alternate carrier service code used for dialling abroad. .TP %t If the preceding field descriptor resulted in an empty string, then the empty string, otherwise a space character. .RE .TP .I tel_dom_fmt followed by a string that contains field descriptors that identify the format used to dial domestic numbers. The recognized field descriptrs are the same as for .IR tel_int_fmt . .TP .I int_select followed by the prefix used to call international phone numbers. .TP .I int_prefix followed by the prefix used from other countries to dial this country. .PP The .B LC_TELEPHONE definition ends with the string .IR "END LC_TELEPHONE" . .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 names of the days of the week. The list starts with the first day of the week as specified by .I week (Sunday by default). .TP .I day followed by a list of names of the days of the week. The list starts with the first day of the week as specified by .I week (Sunday by default). .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. .TP .I week followed by a list of three values: The number of days in a week (by default 7), a date of beginning of the week (by default corresponds to Sunday), and the minimal length of the first week in year (by default 4). Regarding the start of the week, .B 19971130 shall be used for Sunday and .B 19971201 shall be used for Monday. Thus, countries using .B 19971130 should have local Sunday name as the first day in the .I day list, while countries using .B 19971201 should have Monday translation as the first item in the .I day list. .TP .IR first_weekday " (since glibc 2.2)" Number of the first day from the .I day list to be shown in calendar applications. The default value of .B 1 corresponds to either Sunday or Monday depending on the value of the second .I week list item. .TP .IR first_workday " (since glibc 2.2)" Number of the first working day from the .I day list. .PP The .B LC_TIME definition ends with the string .IR "END LC_TIME" . .SH FILES /usr/lib/locale/ \(em database for the current locale setting of that category .br /usr/lib/nls/charmap/* \(em charmap-files .SH CONFORMING TO POSIX.2, ISO/IEC 14652. .SH BUGS This manual page isn't complete. .\" .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), .BR locale (7)