Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 5f7775d66d5394cb95afb60b1b12881e > files > 30

ocaml-camomile-devel-0.8.5-3.mga5.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="CamomileLibrary.ULine.html">
<link rel="next" href="CamomileLibrary.UTF8.html">
<link rel="Up" href="CamomileLibrary.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="CamomileLibrary" rel="Chapter" href="CamomileLibrary.html">
<link title="CamomileLibraryDefault" rel="Chapter" href="CamomileLibraryDefault.html">
<link title="CamomileLibraryDyn" rel="Chapter" href="CamomileLibraryDyn.html"><title>CamomileLibrary.Locale</title>
</head>
<body>
<div class="navbar"><a class="pre" href="CamomileLibrary.ULine.html" title="CamomileLibrary.ULine">Previous</a>
&nbsp;<a class="up" href="CamomileLibrary.html" title="CamomileLibrary">Up</a>
&nbsp;<a class="post" href="CamomileLibrary.UTF8.html" title="CamomileLibrary.UTF8">Next</a>
</div>
<h1>Module <a href="type_CamomileLibrary.Locale.html">CamomileLibrary.Locale</a></h1>

<pre><span class="keyword">module</span> Locale: <code class="code">sig</code> <a href="CamomileLibrary.Locale.html">..</a> <code class="code">end</code></pre><hr width="100%">
<br>
Camomile has a locale system similar to Java.
   A locale is a string with a form as
   "&lt;LANG&gt;_&lt;COUNTRY&gt;_&lt;MODIFIER&gt;..." where &lt;LANG&gt; is 
   a 2-letter ISO 639 language code, &lt;COUNTRY&gt; is a 2-letter ISO 3166
   country code.  Some field may not present.<br>

<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> = <code class="type">string</code> </pre>
<div class="info ">
Type of locales.<br>
</div>


<pre><span id="VALread"><span class="keyword">val</span> read</span> : <code class="type">string -> string -> (Pervasives.in_channel -> 'a) -> string -> 'a</code></pre><div class="info ">
<code class="code">read root suffix reader locale</code>
   reads locale information using <code class="code">reader</code>.  
   Locale data is supposed to reside in <code class="code">root</code> directory with 
   the name <code class="code">locale</code>.<code class="code">suffix</code>.
   <code class="code">reader</code> takes <code class="code">in_channel</code> as an argument and read data from in_channel.
   If data is not found, then <code class="code">reader</code> should raise Not_found.
   If the file is not found or <code class="code">reader</code> raises Not_found, then 
   more generic locales are tried.
   For example, if fr_CA.<code class="code">suffix</code> is not found, then <code class="code">read</code> tries fr.<code class="code">suffix</code>.
   If fr.<code class="code">suffix</code> is also not found, then the file <code class="code">root</code>.<code class="code">suffix</code> is tried.
   Still the data is not found, then <code class="code">Not_found</code> is raised.<br>
</div>

<pre><span id="VALcontain"><span class="keyword">val</span> contain</span> : <code class="type">string -> string -> bool</code></pre><div class="info ">
<code class="code">contain loc1 loc2</code> :
   If <code class="code">loc1</code> is contained in <code class="code">loc2</code> then true otherwise false.
   For example, "fr" is contained in "fr_CA" while "en_CA" 
   does not contain "fr"<br>
</div>
</body></html>