Changeset 13852 in project for release/3/locale/trunk/locale.html


Ignore:
Timestamp:
03/21/09 02:31:41 (12 years ago)
Author:
Kon Lovett
Message:

Added errors file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/locale/trunk/locale.html

    r12806 r13852  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    2 <!-- Generated by eggdoc Revision: 1.20  -->
    3 <html>
    4 <head>
    5 <title>Eggs Unlimited - locale</title><style type="text/css"> <!--
    6       CODE {
    7             color: #666666;
    8           }
    9 /*   DT.definition EM { font-weight: bold; font-style: normal; } */
    10 
    11      DT.definition {
    12                    background: #eee;
    13                    color: black;
    14                    padding: 0.2em 1em 0.2em 0.7em;
    15                    margin-left: 0.2em;
    16 border: 1px solid #bbc;
    17                    font-family: "Andale Mono", monospace;
    18                    /* font-size: 1.2em; */
    19                    
    20                  }
    21      DD {
    22                    margin-top: 0.8em;
    23                    margin-bottom: 0.8em;
    24      }
    25      DIV.subsection {
    26                     border-top: 1px solid #448;
    27                     padding-left: 1em;
    28                     margin-bottom: 1.2em;
    29      }
    30      DIV.subsubsection {
    31                     border-top: 1px dotted #99c;
    32                     /* border-left: 1px solid #99c; */
    33                     padding-left: 1em;
    34                     margin-bottom: 1.2em;
    35      }
    36      DIV.subsubsubsection {
    37                     border-top: 1px solid #ddf;
    38                     padding-left: 1em;
    39                     margin-bottom: 1.2em;
    40      }
    41 
    42          DIV.section {
    43                  margin-bottom: 1.5em;
    44          }
    45          a:link {
    46                  color: #336;
    47          }
    48          a:visited { color: #666; }
    49          a:active  { color: #966; }
    50          a:hover   { color: #669; }
    51          body { margin: 0; padding: 0; background: #fff; color: #000; font: 9pt "Lucida Grande", "Verdana", sans-serif; }
    52          H2 {
    53                  background: #336;
    54                  color: #fff;
    55                  padding-top: 0.5em;
    56                  padding-bottom: 0.5em;
    57                  padding-left: 16px;
    58                  margin: 0 0 1em 0;
    59         }
    60         UL LI {
    61                 list-style: none;
    62         }
    63         TT {
    64                 font-family: "Andale Mono", monospace;
    65                 /* font-size: 1.2em; */
    66         }
    67         H3 {
    68                 color: #113;
    69                 margin-bottom: 0.5em;
    70         }
    71         H4, H5, H6 {
    72                 color: #113;
    73                 margin-bottom: 1.0em;
    74         }
    75         H5 {
    76                 font-weight: normal;
    77                 font-style: italic;
    78                 font-size: 100%;
    79                 margin-top: 1.2em;
    80         }
    81         H6 {
    82                 font-weight: bold;
    83                 font-size: 85%;
    84                 margin-top: 1.2em;
    85         }
    86      DIV#eggheader {
    87          text-align: center;
    88                  float: right;
    89                  margin-right: 2em;
    90      }
    91      DIV#header IMG {
    92             /* display: block; margin-left: auto; margin-right: auto;  */
    93             /* float: right; */
    94             border: none;  /* firefox */
    95      }
    96      DIV#footer {
    97                 background: #bbd;
    98                 padding: 0.7em ;
    99                 border-top: 1px solid #cce;
    100      }
    101      DIV#footer hr {
    102                 display: none;
    103      }
    104      DIV#footer a {
    105                 float: left;
    106      }
    107      DIV#revision-history {
    108          float: right;
    109      }
    110      
    111      DIV#body {
    112                  margin: 1em 1em 1em 16px;
    113          }
    114 
    115      DIV#examples PRE {
    116        background: #eef;
    117        padding: 0.1em;
    118        border: 1px solid #aac;
    119      }
    120      PRE#license, DIV#examples PRE {
    121        padding: 0.5em;
    122      }
    123      DIV#examples PRE {
    124        /* font-size: 85%; */
    125      }
    126      PRE { font-family: "Andale Mono", monospace; }
    127      TABLE {
    128        background: #eef;
    129        padding: 0.2em;
    130        border: 1px solid #aac;
    131        border-collapse: collapse;
    132        width: 100%;
    133      }
    134      TABLE.symbol-table TD.symbol {
    135           width: 15em;
    136           font-family: "Andale Mono", monospace;
    137           /* font-size: 1.2em; */
    138      }
    139      TH {
    140        text-align: left;
    141        border-bottom: 1px solid #aac;
    142        padding: 0.25em 0.5em 0.25em 0.5em;
    143      }
    144      TD { padding: 0.25em 0.5em 0.25em 0.5em; }
    145      --></style></head>
    146 <body>
    147 <div id="header">
    148 <h2>locale</h2>
    149 <div id="eggheader"><a href="index.html">
    150 <img src="egg.jpg" alt="[Picture of an egg]" /></a></div></div>
    151 <div id="body">
    152 <div class="section">
    153 <h3>Description</h3>
    154 <p>Provides locale operations.</p></div>
    155 <div class="section">
    156 <h3>Author</h3><a href="mailto:klovett@pacbell.net">Kon Lovett</a></div>
    157 <div class="section">
    158 <h3>Usage</h3><tt>(require-extension locale)</tt></div>
    159 <div class="section">
    160 <h3>Download</h3><a href="locale.egg">locale.egg</a></div>
    161 <div class="section">
    162 <h3>Requires</h3>
    163 <ul>
    164 <li><a href="miscmacros.html">miscmacros</a></li></ul></div>
    165 <div class="section">
    166 <h3>Documentation</h3>
    167 <p>locale is a set of routines supporting locale query operations. The environment locale information is determined upon module load and the corresponding parameters are set.</p>
    168 <div class="subsection">
    169 <h4>Locale Components</h4>
    170 <p>The major data structure is the <code>locale-components</code> type, portrayed as an extensible <tt>key+value</tt> pairing. The <tt>key</tt> is a <code>symbol</code>. The <tt>value</tt> is usually a <code>string</code>.</p>
    171 <p>A <code>locale-components</code> object will have more properties but the following are provided for every instance:</p><table class="symbol-table">Common Component Keys
    172 <tr>
    173 <td class="symbol">name</td>
    174 <td>The composite information object, source specific.</td></tr>
    175 <tr>
    176 <td class="symbol">source</td>
    177 <td>The origin for the information.</td></tr></table>
    178 <p>The <code>source</code> property is one of the following (others are possible):</p><table class="symbol-table">Source Values
    179 <tr>
    180 <td class="symbol">PLATFORM</td>
    181 <td>Information from the system.</td></tr>
    182 <tr>
    183 <td class="symbol">POSIX</td>
    184 <td>Information from POSIX environment. The &quot;name&quot; is a string.</td></tr>
    185 <tr>
    186 <td class="symbol">BUILTIN</td>
    187 <td>Information from system defaults.</td></tr></table>
    188 <p>The <code>PLATFORM</code> source is used for information first. Then the <code>POSIX</code> source is attempted. When all have failed the <code>BUILTIN</code> source is used. The point being locale information will be available, but without an accuracy guarantee.</p>
    189 <p>The <code>BUILTIN</code> source creates a POSIX-style string &quot;name&quot; constructed using constants and library procedures.</p></div>
    190 <div class="subsection">
    191 <h4>Generic Locale Components Property Access</h4>
    192 <dt class="definition"><strong>procedure:</strong> (locale-components? OBJECT)</dt>
    193 <dd>
    194 <p>Is the <tt>OBJECT</tt> a <code>locale-compenents</code> object?</p></dd>
    195 <dt class="definition"><strong>procedure:</strong> (locale-component-ref LOCALE-COMPONENTS KEY [DEFAULT #f])</dt>
    196 <dd>
    197 <p>Returns the <tt>KEY</tt> property of <tt>LOCALE-COMPONENTS</tt> or the <tt>DEFAULT</tt> when not found.</p></dd>
    198 <dt class="definition"><strong>procedure:</strong> (set-locale-component! LOCALE-COMPONENTS KEY VALUE)</dt>
    199 <dd>
    200 <p>Updates or creates the <tt>KEY</tt> property of <tt>LOCALE-COMPONENTS</tt> with the <tt>VALUE</tt>.</p></dd></div>
    201 <div class="subsection">
    202 <h4>Timezone</h4>
    203 <p>Access to timezone information. A timezone object is a <code>locale-components</code> object with properties for Standard Time Name and Offset, and an optional Summer or Daylight Saving Time Name and Offset. The offset is seconds west (positive) or east (negative) of UTC. The name is some locally accepted timezone name, such as &quot;PST&quot;. A Daylight Saving Time start rule and end rule are optional properties.</p><table class="symbol-table">Timezone Component Properties
    204 <tr>
    205 <td class="symbol">std-name</td>
    206 <td>The Standard timezone name.</td></tr>
    207 <tr>
    208 <td class="symbol">std-offset</td>
    209 <td>Seconds +/- UTC.</td></tr>
    210 <tr>
    211 <td class="symbol">dst-name</td>
    212 <td>The Daylight Saving Time timezone name.</td></tr>
    213 <tr>
    214 <td class="symbol">dst-offset</td>
    215 <td>Seconds +/- UTC.</td></tr>
    216 <tr>
    217 <td class="symbol">dst-start</td>
    218 <td>The start of Daylight Saving Time; a timezone-dst-rule.</td></tr>
    219 <tr>
    220 <td class="symbol">dst-end</td>
    221 <td>The end of Daylight Saving Time; a timezone-dst-rule.</td></tr></table>
    222 <dl>
    223 <dt class="definition"><strong>parameter:</strong> (current-timezone [VALUE])</dt>
    224 <dd>
    225 <p>The currently defined timezone. The specified <tt>VALUE</tt> is either a timezone string value, or <code>#f</code>, indicating no timezone. When no timezone value is set the default timezone is UTC.</p></dd>
    226 <dt class="definition"><strong>procedure:</strong> (current-timezone-components)</dt>
    227 <dd>
    228 <p>Returns the timezone-components object corresponding to the current-timezone.</p></dd>
    229 <dt class="definition"><strong>procedure:</strong> (timezone-components? TIMEZONE-COMPONENTS)</dt>
    230 <dd>
    231 <p>Is the specified <tt>TIMEZONE-COMPONENTS</tt> object actually a timezone-components object?</p></dd>
    232 <dt class="definition"><strong>procedure:</strong> (timezone-component-ref TIMEZONE-COMPONENTS KEY [DEFAULT #f])</dt>
    233 <dd>
    234 <p>Returns the timezone-component <tt>KEY</tt> of the <tt>TIMEZONE-COMPONENTS</tt> object, or the <tt>DEFAULT</tt> for a missing component.</p></dd>
    235 <dt class="definition"><strong>procedure:</strong> (set-timezone-component! TIMEZONE-COMPONENTS KEY VALUE)</dt>
    236 <dd>
    237 <p>Sets the timezone-component <tt>KEY</tt> of the <tt>TIMEZONE-COMPONENTS</tt> object to <tt>VALUE</tt>.</p></dd>
    238 <dt class="definition"><strong>procedure:</strong> (timezone-dst-rule-julian-noleap? TIMEZONE-DST-RULE)</dt>
    239 <dd>
    240 <p>Is the specified <tt>TIMEZONE-DST-RULE</tt> object actually a daylight saving time julian day without leap seconds object?</p></dd>
    241 <dt class="definition"><strong>procedure:</strong> (timezone-dst-rule-julian-leap? TIMEZONE-DST-RULE)</dt>
    242 <dd>
    243 <p>Is the specified <tt>TIMEZONE-DST-RULE</tt> object actually a daylight saving time julian day assuming leap seconds object?</p></dd>
    244 <dt class="definition"><strong>procedure:</strong> (timezone-dst-rule-mwd? TIMEZONE-DST-RULE)</dt>
    245 <dd>
    246 <p>Is the specified <tt>TIMEZONE-DST-RULE</tt> object actually a daylight saving time month+week+day object?</p></dd>
    247 <dt class="definition"><strong>procedure:</strong> (timezone-dst-rule-offset TIMEZONE-DST-RULE)</dt>
    248 <dd>
    249 <p>Returns the seconds within day offset component of the specified <tt>TIMEZONE-DST-RULE</tt> object.</p></dd>
    250 <dt class="definition"><strong>procedure:</strong> (timezone-dst-rule-julian TIMEZONE-DST-RULE)</dt>
    251 <dd>
    252 <p>Returns the julian day component of the specified <tt>TIMEZONE-DST-RULE</tt> object.</p></dd>
    253 <dt class="definition"><strong>procedure:</strong> (timezone-dst-rule-month TIMEZONE-DST-RULE)</dt>
    254 <dd>
    255 <p>Returns the month of year component of the specified <tt>TIMEZONE-DST-RULE</tt> object.</p></dd>
    256 <dt class="definition"><strong>procedure:</strong> (timezone-dst-rule-week TIMEZONE-DST-RULE)</dt>
    257 <dd>
    258 <p>Returns the week of month component of the specified <tt>TIMEZONE-DST-RULE</tt> object.</p></dd>
    259 <dt class="definition"><strong>procedure:</strong> (timezone-dst-rule-day TIMEZONE-DST-RULE)</dt>
    260 <dd>
    261 <p>Returns the day of week component of the specified <tt>TIMEZONE-DST-RULE</tt> object.</p></dd>
    262 <dt class="definition"><strong>procedure:</strong> (make-timezone-dst-rule-julian-leap JULIAN-DAY OFFSET)</dt>
    263 <dd>
    264 <p>Returns a daylight saving time julian day assuming leap seconds rule object.</p></dd>
    265 <dt class="definition"><strong>procedure:</strong> (make-timezone-dst-rule-julian-noleap JULIAN-DAY OFFSET)</dt>
    266 <dd>
    267 <p>Returns a daylight saving time julian day without leap seconds rule object.</p></dd>
    268 <dt class="definition"><strong>procedure:</strong> (make-timezone-dst-rule-mwd MONTH WEEK DAY OFFSET)</dt>
    269 <dd>
    270 <p>Returns a daylight saving time month.week.day rule object.</p></dd>
    271 <dt class="definition"><strong>procedure:</strong> (posix-timezone-value-&gt;timezone-components STRING [SOURCE &quot;POSIX&quot;])</dt>
    272 <dd>
    273 <p>Parses a POSIX timezone string specification, <tt>STRING</tt>, and returns the corresponding timezone-components object, or <code>#f</code> when a parse error occurs. A <code>#f</code> or empty string value is mapped to the default timezone. The optional <tt>SOURCE</tt> indicates what locale system supplied the string.</p></dd>
    274 <dt class="definition"><strong>procedure:</strong> (posix-load-timezone)</dt>
    275 <dd>
    276 <p>Initialize the current-timezone from the TZ environment variable.</p></dd></dl></div>
    277 <div class="subsection">
    278 <h4>Locale</h4>
    279 <p>Access to locale information. A locale object is composed of a Language, an optional Script, an optional Region, an optional Codeset, and an optional Modifier. The language should be an ISO 639-1 or ISO 639-2 name. The Script should be a RFC 3066bis name. The region should be an ISO 3166-1 name. The codeset and modifier forms are locale dependent.</p><table class="symbol-table">Locale Properties
    280 <tr>
    281 <td class="symbol">language</td>
    282 <td>ISO 639-1 or ISO 639-2 name string. Default &quot;en&quot;.</td></tr>
    283 <tr>
    284 <td class="symbol">script</td>
    285 <td>RFC 3066bis name string.</td></tr>
    286 <tr>
    287 <td class="symbol">region</td>
    288 <td>ISO 3166-1 name string. Default &quot;US&quot;.</td></tr>
    289 <tr>
    290 <td class="symbol">codeset</td>
    291 <td>The character code to character mapping system.</td></tr>
    292 <tr>
    293 <td class="symbol">modifier</td>
    294 <td>The codeset subsection, if any.</td></tr></table>
    295 <dl>
    296 <dt class="definition"><strong>parameter:</strong> (current-locale [VALUE])</dt>
    297 <dd>
    298 <p>The currently defined locale. The specified <tt>VALUE</tt> is either a locale string value, or <code>#f</code>, indicating locale independence. When no locale value is set the default locale is <code>#f</code>.</p></dd>
    299 <dt class="definition"><strong>procedure:</strong> (current-locale-components)</dt>
    300 <dd>
    301 <p>Returns the locale-components object corresponding to the current-locale.</p></dd>
    302 <dt class="definition"><strong>procedure:</strong> (locale-components? LOCALE-COMPONENTS)</dt>
    303 <dd>
    304 <p>Is the specified <tt>LOCALE-COMPONENTS</tt> object actually a locale-components object?</p></dd>
    305 <dt class="definition"><strong>procedure:</strong> (locale-component-ref LOCALE-COMPONENTS KEY [DEFAULT #f])</dt>
    306 <dd>
    307 <p>Returns the locale-component <tt>KEY</tt> of the <tt>LOCALE-COMPONENTS</tt> object, or the <tt>DEFAULT</tt> for a missing component.</p></dd>
    308 <dt class="definition"><strong>procedure:</strong> (set-locale-component! LOCALE-COMPONENTS KEY VALUE)</dt>
    309 <dd>
    310 <p>Sets the locale-component <tt>KEY</tt> of the <tt>LOCALE-COMPONENTS</tt> object to <tt>VALUE</tt>.</p></dd>
    311 <dt class="definition"><strong>procedure:</strong> (posix-locale-value-&gt;locale-components STRING [SOURCE &quot;POSIX&quot;])</dt>
    312 <dd>
    313 <p>Parses a POSIX locale string specification, <tt>STRING</tt>, and returns the corresponding locale-components object, or <code>#f</code> when a parse error occurs. A <code>#f</code> or empty string value is mapped to the default locale. The optional <tt>SOURCE</tt> indicates what locale system supplied the string.</p></dd>
    314 <dt class="definition"><strong>procedure:</strong> (posix-load-locale)</dt>
    315 <dd>
    316 <p>Initialize the current-locale from the LC_* or LANG environment variables. When both the LC_ALL and LANG environment variables are not set the current-locale is <code>#f</code>, even though some locale-categories may have values. LC_ALL or LANG should be set if any locale categories are set.</p></dd></dl></div>
    317 <div class="subsection">
    318 <h4>Locale Category</h4>
    319 <p>Access to the locale information by category.</p><table class="symbol-table">Locale Category Keys
    320 <tr>
    321 <td class="symbol">ADDRESS</td>
    322 <td></td></tr>
    323 <tr>
    324 <td class="symbol">COLLATE</td>
    325 <td></td></tr>
    326 <tr>
    327 <td class="symbol">CTYPE</td>
    328 <td></td></tr>
    329 <tr>
    330 <td class="symbol">IDENTIFICATION</td>
    331 <td></td></tr>
    332 <tr>
    333 <td class="symbol">LANGUAGE</td>
    334 <td></td></tr>
    335 <tr>
    336 <td class="symbol">MEASUREMENT</td>
    337 <td></td></tr>
    338 <tr>
    339 <td class="symbol">MESSAGES</td>
    340 <td></td></tr>
    341 <tr>
    342 <td class="symbol">MONETARY</td>
    343 <td></td></tr>
    344 <tr>
    345 <td class="symbol">NAME</td>
    346 <td></td></tr>
    347 <tr>
    348 <td class="symbol">NUMERIC</td>
    349 <td></td></tr>
    350 <tr>
    351 <td class="symbol">PAPER</td>
    352 <td></td></tr>
    353 <tr>
    354 <td class="symbol">TELEPHONE</td>
    355 <td></td></tr>
    356 <tr>
    357 <td class="symbol">TIME</td>
    358 <td></td></tr></table>
    359 <dl>
    360 <dt class="definition"><strong>procedure:</strong> (set-locale-category! CATEGORY LOCALE-COMPONENTS)</dt>
    361 <dd>
    362 <p>Sets the specified <tt>CATEGORY</tt> to the specified <tt>LOCALE-COMPONENTS</tt> object.</p></dd>
    363 <dt class="definition"><strong>procedure:</strong> (locale-category-ref CATEGORY)</dt>
    364 <dd>
    365 <p>Returns the specified <tt>CATEGORY</tt> locale-components object, or <code>#f</code> if the category is not valued.</p></dd></dl></div></div>
    366 <div class="section">
    367 <h3>Issues</h3>
    368 <p>NOTE: This is a work in progress. Currently only the Posix locale information is supported. Plans are to support the native MacOS X and Windows locale APIs. Changes to this API are almost certain.</p></div>
    369 <div class="section">
    370 <h3>Version</h3>
    371 <ul>
    372 <li>0.4.0 Added &quot;default&quot; timezone &amp; locale</li>
    373 <li>0.3.3 Removed use of 'critical-section'</li>
    374 <li>0.3.2 Dropped :optional</li>
    375 <li>0.3.1 Bug fix for default dst offset</li>
    376 <li>0.3 Reverts to defaults for timezone &amp; locale when parse errors</li>
    377 <li>0.2 Exports</li>
    378 <li>0.1 Initial release</li></ul></div>
    379 <div class="section">
    380 <h3>License</h3>
    381 <pre>Copyright (c) 2005, Kon Lovett.  All rights reserved.
    382 
    383 Permission is hereby granted, free of charge, to any person obtaining a
    384 copy of this software and associated documentation files (the Software),
    385 to deal in the Software without restriction, including without limitation
    386 the rights to use, copy, modify, merge, publish, distribute, sublicense,
    387 and/or sell copies of the Software, and to permit persons to whom the
    388 Software is furnished to do so, subject to the following conditions:
    389 
    390 The above copyright notice and this permission notice shall be included
    391 in all copies or substantial portions of the Software.
    392 
    393 THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    394 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    395 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    396 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
    397 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    398 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    399 OTHER DEALINGS IN THE SOFTWARE.</pre></div></div>
    400 <div id="footer">
    401 <hr /><a href="index.html">&lt; Egg index</a>
    402 <div id="revision-history">$Revision$ $Date$</div>&nbsp;</div></body></html>
Note: See TracChangeset for help on using the changeset viewer.