]> pere.pagekite.me Git - homepage.git/blobdiff - linux/glibc/howto.html
More info.
[homepage.git] / linux / glibc / howto.html
index 641827d4e58617fdb13d039201c3f1eb70dd6abd..82b55a200f574669c78c19aa6ed4c348665290a5 100644 (file)
        country/region code is a code from ISO 3166.  If the language
        or region in question is missing in the ISO standard, one need
        to get the ISO standard updated before the locale will be
        country/region code is a code from ISO 3166.  If the language
        or region in question is missing in the ISO standard, one need
        to get the ISO standard updated before the locale will be
-       included in glibc.</p>
+       included in glibc.  If one can't convince the ISO 639
+       maintainers that your language exists (and thus need a
+       language code), the glibc maintainers will refuse to add the
+       locale.  In addition, the glibc maintainers seem to refuse
+       "artificial languages" like Esperanto and Lojban, even if they
+       got a ISO 639 code.</p>
 
       <p>Little is known about the requirements for the naming of
        modifiers.  The following modifiers are currently used:
        abegede, cyrillic, euro and saaho.  This might indicate that
        lower case letters are prefered in modifier names.</p>
 
 
       <p>Little is known about the requirements for the naming of
        modifiers.  The following modifiers are currently used:
        abegede, cyrillic, euro and saaho.  This might indicate that
        lower case letters are prefered in modifier names.</p>
 
+      <p>It is recommended to follow RFC 3066 when selecting locale
+       names.</p>
 
       <ul>
 
       <ul>
-       <li><a href="http://www.unicode.org/onlinedat/countries.html">ISO 3166</a></li>
-       <li><a href="http://www.loc.gov/standards/iso639-2/">ISO 639</a>
+
+       <li><a href="http://www.unicode.org/onlinedat/countries.html">ISO
+           3166</a></li>
+
+       <li><a href="http://www.loc.gov/standards/iso639-2/">ISO 639</a></li>
+
+       <li><a href="http://rfc.sunsite.dk/rfc/rfc3066.html"> RFC 3066
+           - Tags for the Identification of Languages</a></li>
+           
       </ul>
 
     <h2>Category order</h2>
       </ul>
 
     <h2>Category order</h2>
 
     <h2>Reuse when possible</h2>
 
 
     <h2>Reuse when possible</h2>
 
-    - "copy" from existing locales if the content should be identical
+      <p>One should avoid cut-n-paste when possible, and instead use
+       the <tt>copy</tt> statement to include sections from locales
+       with identical content.</p>
 
 
-    <h2>LD_INDENTIFICATION</h2>
+    <h2>LD_IDENTIFICATION</h2>
 
 
-    - standard refs in the LD_INDENTIFICATION
+      <p>The category entries are references to the standard used when
+       writing the given section.  The standard refs should have
+       quotes around them, and should not use the &lt;U#&gt;
+       notation.  They should normally look like this:</p>
+      <blockquote><pre>
+category  "i18n:1997";LC_IDENTIFICATION
+       </pre></blockquote>
 
     <h2>LC_MESSAGES</h2>
 
 
     <h2>LC_MESSAGES</h2>
 
-    - yes/no expr should have the form ^[yYnN<extra>], without 0 and 1
+      <p>Then yesexpr and noexpr entries should have the form
+       <tt>^[yYnN&lt;extra&gt;]</tt>, without 0 and 1 and without
+       trailing "<tt>.*</tt>".</p>
 
     <h2>Standard documents and specifications</h2>
 
 
     <h2>Standard documents and specifications</h2>
 
+    <h2>Testing the new locale file</h2>
+
+       <p>To test a new locale on a test machine, do the
+       following:</p>
+
+       <ul>
+
+         <li>Copy the new locale to
+           <tt>/usr/share/i18n/locales/<em>filename</em></tt></li>
+
+         <li>Run <tt>localedef -i <em>inputfile</em> -c -f
+             <em>charset<em> <em>locale</em></tt> to generate a
+           binary locale file in
+           <tt>/usr/lib/locale/<em>locale</em>/</tt></li>
+
+         <li>Test it using LANG=<em>locale</em>, for example by
+           running <tt>date</tt></li>
+
+       </ul>
+
+       <p>Example, generating a new <tt>de_DE@euro</tt> locale using
+         the ISO-8859-15 charset and save it as 'de_DE':</p>
+
+       <pre>
+         cp de_DE@euro /usr/share/i18n/locales/de_DE@euro
+         localedef -i de_DE@euro -c -f ISO-8859-15 de_DE
+         LANG=de_DE date
+       </pre>
+       
     </div>
 
     <hr>
     <address><a href="mailto:pere@hungry.com">Petter Reinholdtsen</a></address>
 <!-- Created: Sun Mar 21 18:14:42 CET 2004 -->
 <!-- hhmts start -->
     </div>
 
     <hr>
     <address><a href="mailto:pere@hungry.com">Petter Reinholdtsen</a></address>
 <!-- Created: Sun Mar 21 18:14:42 CET 2004 -->
 <!-- hhmts start -->
-Last modified: Sat Jul 24 15:19:14 CEST 2004
+Last modified: Sat Oct 30 02:01:11 CEST 2004
 <!-- hhmts end -->
   </body>
 </html>
 <!-- hhmts end -->
   </body>
 </html>