This is a draft document explaining how to write locale files
for GNU libc. It will not go into details, but reference
specifications. It will on the other hand mention some of the
pitfalls, and try to document the current practice.
How to choose the locale file name
- how to choose the file name
Category order
To make it easier to compare locales with each other, I
recommend using the same order for the categories in all
locales. Any order will do, so I picked the order used in most
locales, and decided to recommend this order:
- LC_IDENTIFICATION
- LC_CTYPE
- LC_COLLATE
- LC_MONETARY
- LC_NUMERIC
- LC_TIME
- LC_MESSAGES
- LC_PAPER
- LC_NAME
- LC_ADDRESS
- LC_TELEPHONE
- LC_MEASUREMENT
Reuse when possible
- "copy" from existing locales if the content should be identical
LD_INDENTIFICATION
- standard refs in the LD_INDENTIFICATION
LC_MESSAGES
- yes/no expr should have the form ^[yYnN
], without 0 and 1
Standard documents and specifications