]> pere.pagekite.me Git - homepage.git/blob - linux/glibc/howto.html
f3b604191c08daac012085ff2b94cdc472db6a87
[homepage.git] / linux / glibc / howto.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <title>How to write a GNU libc locale</title>
5 </head>
6
7 <body>
8 <h1>How to write a GNU libc locale</h1>
9
10 <address>by Petter Reinholdtsen</address>
11
12 <p>This is a draft document explaining how to write locale files
13 for GNU libc. It will not go into details, but reference
14 specifications. It will on the other hand mention some of the
15 pitfalls, and try to document the current practice.</p>
16
17 <h2>How to choose the locale file name</h2>
18
19 - how to choose the file name
20
21 <h2>Category order</h2>
22
23 <p>To make it easier to compare locales with each other, I
24 recommend using the same order for the categories in all
25 locales. Any order will do, so I picked the order used in most
26 locales, and decided to recommend this order:</p>
27
28 <ol>
29 <li>LC_IDENTIFICATION
30 <li>LC_CTYPE
31 <li>LC_COLLATE
32 <li>LC_MONETARY
33 <li>LC_NUMERIC
34 <li>LC_TIME
35 <li>LC_MESSAGES
36 <li>LC_PAPER
37 <li>LC_NAME
38 <li>LC_ADDRESS
39 <li>LC_TELEPHONE
40 <li>LC_MEASUREMENT
41 </ol>
42
43 <h2>Reuse when possible</h2>
44
45 - "copy" from existing locales if the content should be identical
46
47 <h2>LD_INDENTIFICATION</h2>
48
49 - standard refs in the LD_INDENTIFICATION
50
51 <h2>LC_MESSAGES</h2>
52
53 - yes/no expr should have the form ^[yYnN<extra>], without 0 and 1
54
55 <h2>Standard documents and specifications</h2>
56
57 <hr>
58 <address><a href="mailto:pere@hungry.com">Petter Reinholdtsen</a></address>
59 <!-- Created: Sun Mar 21 18:14:42 CET 2004 -->
60 <!-- hhmts start -->
61 Last modified: Sat May 15 11:56:09 CEST 2004
62 <!-- hhmts end -->
63 </body>
64 </html>