src/build/html/pyams_i18n.html
changeset 11 ba0b83b57c0c
parent 10 1d12ff3f036a
child 12 f1f1e99a6572
equal deleted inserted replaced
10:1d12ff3f036a 11:ba0b83b57c0c
     1 
       
     2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       
     3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 
       
     5 <html xmlns="http://www.w3.org/1999/xhtml">
       
     6   <head>
       
     7     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       
     8     <title>PyAMS internationalization &#8212; PyAMS User Guide 0.1.0 documentation</title>
       
     9     <link rel="stylesheet" href="_static/pyramid.css" type="text/css" />
       
    10     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
       
    11     <script type="text/javascript">
       
    12       var DOCUMENTATION_OPTIONS = {
       
    13         URL_ROOT:    './',
       
    14         VERSION:     '0.1.0',
       
    15         COLLAPSE_INDEX: false,
       
    16         FILE_SUFFIX: '.html',
       
    17         HAS_SOURCE:  true,
       
    18         SOURCELINK_SUFFIX: '.txt'
       
    19       };
       
    20     </script>
       
    21     <script type="text/javascript" src="_static/jquery.js"></script>
       
    22     <script type="text/javascript" src="_static/underscore.js"></script>
       
    23     <script type="text/javascript" src="_static/doctools.js"></script>
       
    24     <link rel="index" title="Index" href="genindex.html" />
       
    25     <link rel="search" title="Search" href="search.html" />
       
    26 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Neuton&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
       
    27 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
       
    28 <!--[if lte IE 6]>
       
    29 <link rel="stylesheet" href="_static/ie6.css" type="text/css" media="screen" charset="utf-8" />
       
    30 <![endif]-->
       
    31 
       
    32   </head>
       
    33   <body>
       
    34 
       
    35     <div class="related" role="navigation" aria-label="related navigation">
       
    36       <h3>Navigation</h3>
       
    37       <ul>
       
    38         <li class="right" style="margin-right: 10px">
       
    39           <a href="genindex.html" title="General Index"
       
    40              accesskey="I">index</a></li>
       
    41         <li class="right" >
       
    42           <a href="py-modindex.html" title="Python Module Index"
       
    43              >modules</a> |</li>
       
    44         <li class="nav-item nav-item-0"><a href="index.html">PyAMS User Guide 0.1.0 documentation</a> &#187;</li> 
       
    45       </ul>
       
    46     </div>  
       
    47 
       
    48     <div class="document">
       
    49       <div class="documentwrapper">
       
    50         <div class="bodywrapper">
       
    51           <div class="body" role="main">
       
    52             
       
    53   <div class="section" id="pyams-internationalization">
       
    54 <span id="pyams-i18n"></span><h1>PyAMS internationalization<a class="headerlink" href="#pyams-internationalization" title="Permalink to this headline">¶</a></h1>
       
    55 <div class="section" id="module-pyams_i18n">
       
    56 <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyams_i18n" title="Permalink to this headline">¶</a></h2>
       
    57 <dl class="function">
       
    58 <dt id="pyams_i18n.includeme">
       
    59 <code class="descclassname">pyams_i18n.</code><code class="descname">includeme</code><span class="sig-paren">(</span><em>config</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.includeme" title="Permalink to this definition">¶</a></dt>
       
    60 <dd><p>pyams_i18n include features</p>
       
    61 </dd></dl>
       
    62 
       
    63 </div>
       
    64 <div class="section" id="subpackages">
       
    65 <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
       
    66 <div class="toctree-wrapper compound">
       
    67 <ul>
       
    68 <li class="toctree-l1"><a class="reference internal" href="pyams_i18n.interfaces.html">pyams_i18n.interfaces package</a><ul>
       
    69 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.interfaces.html#submodules">Submodules</a></li>
       
    70 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.interfaces.html#module-pyams_i18n.interfaces.schema">pyams_i18n.interfaces.schema module</a></li>
       
    71 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.interfaces.html#module-pyams_i18n.interfaces.widget">pyams_i18n.interfaces.widget module</a></li>
       
    72 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.interfaces.html#module-pyams_i18n.interfaces">Module contents</a></li>
       
    73 </ul>
       
    74 </li>
       
    75 <li class="toctree-l1"><a class="reference internal" href="pyams_i18n.widget.html">pyams_i18n.widget package</a><ul>
       
    76 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.widget.html#module-pyams_i18n.widget">Module contents</a></li>
       
    77 </ul>
       
    78 </li>
       
    79 <li class="toctree-l1"><a class="reference internal" href="pyams_i18n.zmi.html">pyams_i18n.zmi package</a><ul>
       
    80 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.zmi.html#submodules">Submodules</a></li>
       
    81 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.zmi.html#module-pyams_i18n.zmi.language">pyams_i18n.zmi.language module</a></li>
       
    82 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.zmi.html#module-pyams_i18n.zmi.negotiator">pyams_i18n.zmi.negotiator module</a></li>
       
    83 <li class="toctree-l2"><a class="reference internal" href="pyams_i18n.zmi.html#module-pyams_i18n.zmi">Module contents</a></li>
       
    84 </ul>
       
    85 </li>
       
    86 </ul>
       
    87 </div>
       
    88 </div>
       
    89 <div class="section" id="submodules">
       
    90 <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
       
    91 <div class="section" id="module-pyams_i18n.attr">
       
    92 <span id="pyams-i18n-attr-module"></span><h3>pyams_i18n.attr module<a class="headerlink" href="#module-pyams_i18n.attr" title="Permalink to this headline">¶</a></h3>
       
    93 <dl class="class">
       
    94 <dt id="pyams_i18n.attr.I18nAttributeAdapter">
       
    95 <em class="property">class </em><code class="descclassname">pyams_i18n.attr.</code><code class="descname">I18nAttributeAdapter</code><span class="sig-paren">(</span><em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.attr.I18nAttributeAdapter" title="Permalink to this definition">¶</a></dt>
       
    96 <dd><p>Bases: <a class="reference internal" href="pyams_utils.html#pyams_utils.adapter.ContextAdapter" title="pyams_utils.adapter.ContextAdapter"><code class="xref py py-class docutils literal"><span class="pre">pyams_utils.adapter.ContextAdapter</span></code></a></p>
       
    97 <p>I18n attribute adapter</p>
       
    98 <dl class="method">
       
    99 <dt id="pyams_i18n.attr.I18nAttributeAdapter.get_attribute">
       
   100 <code class="descname">get_attribute</code><span class="sig-paren">(</span><em>attribute</em>, <em>lang=None</em>, <em>request=None</em>, <em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.attr.I18nAttributeAdapter.get_attribute" title="Permalink to this definition">¶</a></dt>
       
   101 <dd></dd></dl>
       
   102 
       
   103 <dl class="method">
       
   104 <dt id="pyams_i18n.attr.I18nAttributeAdapter.query_attribute">
       
   105 <code class="descname">query_attribute</code><span class="sig-paren">(</span><em>attribute</em>, <em>lang=None</em>, <em>request=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.attr.I18nAttributeAdapter.query_attribute" title="Permalink to this definition">¶</a></dt>
       
   106 <dd></dd></dl>
       
   107 
       
   108 </dd></dl>
       
   109 
       
   110 <dl class="class">
       
   111 <dt id="pyams_i18n.attr.I18nAttributeTraverser">
       
   112 <em class="property">class </em><code class="descclassname">pyams_i18n.attr.</code><code class="descname">I18nAttributeTraverser</code><span class="sig-paren">(</span><em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.attr.I18nAttributeTraverser" title="Permalink to this definition">¶</a></dt>
       
   113 <dd><p>Bases: <a class="reference internal" href="pyams_utils.html#pyams_utils.adapter.ContextAdapter" title="pyams_utils.adapter.ContextAdapter"><code class="xref py py-class docutils literal"><span class="pre">pyams_utils.adapter.ContextAdapter</span></code></a></p>
       
   114 <p>++i18n++attr:lang namespace traverser</p>
       
   115 <dl class="method">
       
   116 <dt id="pyams_i18n.attr.I18nAttributeTraverser.traverse">
       
   117 <code class="descname">traverse</code><span class="sig-paren">(</span><em>name</em>, <em>furtherpath=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.attr.I18nAttributeTraverser.traverse" title="Permalink to this definition">¶</a></dt>
       
   118 <dd></dd></dl>
       
   119 
       
   120 </dd></dl>
       
   121 
       
   122 </div>
       
   123 <div class="section" id="module-pyams_i18n.column">
       
   124 <span id="pyams-i18n-column-module"></span><h3>pyams_i18n.column module<a class="headerlink" href="#module-pyams_i18n.column" title="Permalink to this headline">¶</a></h3>
       
   125 <dl class="class">
       
   126 <dt id="pyams_i18n.column.I18nAttrColumn">
       
   127 <em class="property">class </em><code class="descclassname">pyams_i18n.column.</code><code class="descname">I18nAttrColumn</code><span class="sig-paren">(</span><em>context</em>, <em>request</em>, <em>table</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.column.I18nAttrColumn" title="Permalink to this definition">¶</a></dt>
       
   128 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">z3c.table.column.GetAttrColumn</span></code></p>
       
   129 <p>Column with I18n attribute value</p>
       
   130 <dl class="method">
       
   131 <dt id="pyams_i18n.column.I18nAttrColumn.getValue">
       
   132 <code class="descname">getValue</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.column.I18nAttrColumn.getValue" title="Permalink to this definition">¶</a></dt>
       
   133 <dd></dd></dl>
       
   134 
       
   135 </dd></dl>
       
   136 
       
   137 </div>
       
   138 <div class="section" id="module-pyams_i18n.content">
       
   139 <span id="pyams-i18n-content-module"></span><h3>pyams_i18n.content module<a class="headerlink" href="#module-pyams_i18n.content" title="Permalink to this headline">¶</a></h3>
       
   140 <dl class="class">
       
   141 <dt id="pyams_i18n.content.I18nManagerMixin">
       
   142 <em class="property">class </em><code class="descclassname">pyams_i18n.content.</code><code class="descname">I18nManagerMixin</code><a class="headerlink" href="#pyams_i18n.content.I18nManagerMixin" title="Permalink to this definition">¶</a></dt>
       
   143 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
       
   144 <p>I18n manager class mixin</p>
       
   145 <dl class="method">
       
   146 <dt id="pyams_i18n.content.I18nManagerMixin.get_languages">
       
   147 <code class="descname">get_languages</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.content.I18nManagerMixin.get_languages" title="Permalink to this definition">¶</a></dt>
       
   148 <dd></dd></dl>
       
   149 
       
   150 <dl class="attribute">
       
   151 <dt id="pyams_i18n.content.I18nManagerMixin.languages">
       
   152 <code class="descname">languages</code><a class="headerlink" href="#pyams_i18n.content.I18nManagerMixin.languages" title="Permalink to this definition">¶</a></dt>
       
   153 <dd><p>Computed attributes based on schema fields</p>
       
   154 <p>Field properties provide default values, data validation and error messages
       
   155 based on data found in field meta-data.</p>
       
   156 <p>Note that FieldProperties cannot be used with slots. They can only
       
   157 be used for attributes stored in instance dictionaries.</p>
       
   158 </dd></dl>
       
   159 
       
   160 </dd></dl>
       
   161 
       
   162 </div>
       
   163 <div class="section" id="module-pyams_i18n.expr">
       
   164 <span id="pyams-i18n-expr-module"></span><h3>pyams_i18n.expr module<a class="headerlink" href="#module-pyams_i18n.expr" title="Permalink to this headline">¶</a></h3>
       
   165 <dl class="class">
       
   166 <dt id="pyams_i18n.expr.I18nExpr">
       
   167 <em class="property">class </em><code class="descclassname">pyams_i18n.expr.</code><code class="descname">I18nExpr</code><span class="sig-paren">(</span><em>expression</em>, <em>braces_required=False</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.expr.I18nExpr" title="Permalink to this definition">¶</a></dt>
       
   168 <dd><p>Bases: <a class="reference internal" href="pyams_utils.html#pyams_utils.tales.ContextExprMixin" title="pyams_utils.tales.ContextExprMixin"><code class="xref py py-class docutils literal"><span class="pre">pyams_utils.tales.ContextExprMixin</span></code></a>, <code class="xref py py-class docutils literal"><span class="pre">chameleon.tales.StringExpr</span></code></p>
       
   169 <p>i18n:context.attribute TALES expression</p>
       
   170 <dl class="attribute">
       
   171 <dt id="pyams_i18n.expr.I18nExpr.transform">
       
   172 <code class="descname">transform</code><em class="property"> = &lt;Symbol value=&lt;function render_i18n_expression&gt; at 7fe7830305c0&gt;</em><a class="headerlink" href="#pyams_i18n.expr.I18nExpr.transform" title="Permalink to this definition">¶</a></dt>
       
   173 <dd></dd></dl>
       
   174 
       
   175 </dd></dl>
       
   176 
       
   177 <dl class="function">
       
   178 <dt id="pyams_i18n.expr.render_i18n_expression">
       
   179 <code class="descclassname">pyams_i18n.expr.</code><code class="descname">render_i18n_expression</code><span class="sig-paren">(</span><em>econtext</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.expr.render_i18n_expression" title="Permalink to this definition">¶</a></dt>
       
   180 <dd><p>Render an I18n expression</p>
       
   181 <p>Value can be given as a single attribute name (for example: “i18n:title”), in which case value
       
   182 is extracted from current “context”.
       
   183 But value can also be given as a dotted name, for example “i18n:local_var.property.title”.</p>
       
   184 </dd></dl>
       
   185 
       
   186 </div>
       
   187 <div class="section" id="module-pyams_i18n.include">
       
   188 <span id="pyams-i18n-include-module"></span><h3>pyams_i18n.include module<a class="headerlink" href="#module-pyams_i18n.include" title="Permalink to this headline">¶</a></h3>
       
   189 <dl class="function">
       
   190 <dt id="pyams_i18n.include.include_package">
       
   191 <code class="descclassname">pyams_i18n.include.</code><code class="descname">include_package</code><span class="sig-paren">(</span><em>config</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.include.include_package" title="Permalink to this definition">¶</a></dt>
       
   192 <dd><p>Pyramid package include</p>
       
   193 </dd></dl>
       
   194 
       
   195 </div>
       
   196 <div class="section" id="module-pyams_i18n.index">
       
   197 <span id="pyams-i18n-index-module"></span><h3>pyams_i18n.index module<a class="headerlink" href="#module-pyams_i18n.index" title="Permalink to this headline">¶</a></h3>
       
   198 <dl class="class">
       
   199 <dt id="pyams_i18n.index.I18nTextIndexMixin">
       
   200 <em class="property">class </em><code class="descclassname">pyams_i18n.index.</code><code class="descname">I18nTextIndexMixin</code><span class="sig-paren">(</span><em>language</em>, <em>interface=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.index.I18nTextIndexMixin" title="Permalink to this definition">¶</a></dt>
       
   201 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">hypatia.util.BaseIndexMixin</span></code></p>
       
   202 <p>I18n text index mixin</p>
       
   203 <dl class="method">
       
   204 <dt id="pyams_i18n.index.I18nTextIndexMixin.discriminate">
       
   205 <code class="descname">discriminate</code><span class="sig-paren">(</span><em>obj</em>, <em>default</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.index.I18nTextIndexMixin.discriminate" title="Permalink to this definition">¶</a></dt>
       
   206 <dd></dd></dl>
       
   207 
       
   208 </dd></dl>
       
   209 
       
   210 <dl class="class">
       
   211 <dt id="pyams_i18n.index.I18nTextIndexWithInterface">
       
   212 <em class="property">class </em><code class="descclassname">pyams_i18n.index.</code><code class="descname">I18nTextIndexWithInterface</code><span class="sig-paren">(</span><em>language</em>, <em>discriminator</em>, <em>interface=None</em>, <em>lexicon=None</em>, <em>index=None</em>, <em>family=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.index.I18nTextIndexWithInterface" title="Permalink to this definition">¶</a></dt>
       
   213 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.index.I18nTextIndexMixin" title="pyams_i18n.index.I18nTextIndexMixin"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.index.I18nTextIndexMixin</span></code></a>, <code class="xref py py-class docutils literal"><span class="pre">hypatia.text.TextIndex</span></code></p>
       
   214 <p>I18n text index</p>
       
   215 </dd></dl>
       
   216 
       
   217 </div>
       
   218 <div class="section" id="module-pyams_i18n.language">
       
   219 <span id="pyams-i18n-language-module"></span><h3>pyams_i18n.language module<a class="headerlink" href="#module-pyams_i18n.language" title="Permalink to this headline">¶</a></h3>
       
   220 <dl class="class">
       
   221 <dt id="pyams_i18n.language.BaseLanguagesVocabulary">
       
   222 <em class="property">class </em><code class="descclassname">pyams_i18n.language.</code><code class="descname">BaseLanguagesVocabulary</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.language.BaseLanguagesVocabulary" title="Permalink to this definition">¶</a></dt>
       
   223 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">zope.schema.vocabulary.SimpleVocabulary</span></code></p>
       
   224 <p>Base languages vocabulary, matching ISO 639-1 languages codes</p>
       
   225 </dd></dl>
       
   226 
       
   227 <dl class="class">
       
   228 <dt id="pyams_i18n.language.ISOLanguagesVocabulary">
       
   229 <em class="property">class </em><code class="descclassname">pyams_i18n.language.</code><code class="descname">ISOLanguagesVocabulary</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.language.ISOLanguagesVocabulary" title="Permalink to this definition">¶</a></dt>
       
   230 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">zope.schema.vocabulary.SimpleVocabulary</span></code></p>
       
   231 </dd></dl>
       
   232 
       
   233 </div>
       
   234 <div class="section" id="module-pyams_i18n.negotiator">
       
   235 <span id="pyams-i18n-negotiator-module"></span><h3>pyams_i18n.negotiator module<a class="headerlink" href="#module-pyams_i18n.negotiator" title="Permalink to this headline">¶</a></h3>
       
   236 <dl class="class">
       
   237 <dt id="pyams_i18n.negotiator.Negotiator">
       
   238 <em class="property">class </em><code class="descclassname">pyams_i18n.negotiator.</code><code class="descname">Negotiator</code><a class="headerlink" href="#pyams_i18n.negotiator.Negotiator" title="Permalink to this definition">¶</a></dt>
       
   239 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">persistent.Persistent</span></code>, <code class="xref py py-class docutils literal"><span class="pre">zope.container.contained.Contained</span></code></p>
       
   240 <p>Language negotiator utility</p>
       
   241 <dl class="attribute">
       
   242 <dt id="pyams_i18n.negotiator.Negotiator.cache_enabled">
       
   243 <code class="descname">cache_enabled</code><a class="headerlink" href="#pyams_i18n.negotiator.Negotiator.cache_enabled" title="Permalink to this definition">¶</a></dt>
       
   244 <dd><p>Computed attributes based on schema fields</p>
       
   245 <p>Field properties provide default values, data validation and error messages
       
   246 based on data found in field meta-data.</p>
       
   247 <p>Note that FieldProperties cannot be used with slots. They can only
       
   248 be used for attributes stored in instance dictionaries.</p>
       
   249 </dd></dl>
       
   250 
       
   251 <dl class="method">
       
   252 <dt id="pyams_i18n.negotiator.Negotiator.clear_cache">
       
   253 <code class="descname">clear_cache</code><span class="sig-paren">(</span><em>request</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.negotiator.Negotiator.clear_cache" title="Permalink to this definition">¶</a></dt>
       
   254 <dd><p>Clear cached language value</p>
       
   255 </dd></dl>
       
   256 
       
   257 <dl class="method">
       
   258 <dt id="pyams_i18n.negotiator.Negotiator.get_language">
       
   259 <code class="descname">get_language</code><span class="sig-paren">(</span><em>request</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.negotiator.Negotiator.get_language" title="Permalink to this definition">¶</a></dt>
       
   260 <dd><p>See <a href="#id1"><span class="problematic" id="id2">:intf:`INegotiator`</span></a></p>
       
   261 </dd></dl>
       
   262 
       
   263 <dl class="attribute">
       
   264 <dt id="pyams_i18n.negotiator.Negotiator.offered_languages">
       
   265 <code class="descname">offered_languages</code><a class="headerlink" href="#pyams_i18n.negotiator.Negotiator.offered_languages" title="Permalink to this definition">¶</a></dt>
       
   266 <dd><p>Computed attributes based on schema fields</p>
       
   267 <p>Field properties provide default values, data validation and error messages
       
   268 based on data found in field meta-data.</p>
       
   269 <p>Note that FieldProperties cannot be used with slots. They can only
       
   270 be used for attributes stored in instance dictionaries.</p>
       
   271 </dd></dl>
       
   272 
       
   273 <dl class="attribute">
       
   274 <dt id="pyams_i18n.negotiator.Negotiator.policy">
       
   275 <code class="descname">policy</code><a class="headerlink" href="#pyams_i18n.negotiator.Negotiator.policy" title="Permalink to this definition">¶</a></dt>
       
   276 <dd><p>Computed attributes based on schema fields</p>
       
   277 <p>Field properties provide default values, data validation and error messages
       
   278 based on data found in field meta-data.</p>
       
   279 <p>Note that FieldProperties cannot be used with slots. They can only
       
   280 be used for attributes stored in instance dictionaries.</p>
       
   281 </dd></dl>
       
   282 
       
   283 <dl class="attribute">
       
   284 <dt id="pyams_i18n.negotiator.Negotiator.server_language">
       
   285 <code class="descname">server_language</code><a class="headerlink" href="#pyams_i18n.negotiator.Negotiator.server_language" title="Permalink to this definition">¶</a></dt>
       
   286 <dd><p>Computed attributes based on schema fields</p>
       
   287 <p>Field properties provide default values, data validation and error messages
       
   288 based on data found in field meta-data.</p>
       
   289 <p>Note that FieldProperties cannot be used with slots. They can only
       
   290 be used for attributes stored in instance dictionaries.</p>
       
   291 </dd></dl>
       
   292 
       
   293 </dd></dl>
       
   294 
       
   295 <dl class="class">
       
   296 <dt id="pyams_i18n.negotiator.ZopeNegotiator">
       
   297 <em class="property">class </em><code class="descclassname">pyams_i18n.negotiator.</code><code class="descname">ZopeNegotiator</code><a class="headerlink" href="#pyams_i18n.negotiator.ZopeNegotiator" title="Permalink to this definition">¶</a></dt>
       
   298 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
       
   299 <p>Zope language negotiator</p>
       
   300 <dl class="method">
       
   301 <dt id="pyams_i18n.negotiator.ZopeNegotiator.getLanguage">
       
   302 <code class="descname">getLanguage</code><span class="sig-paren">(</span><em>langs</em>, <em>env</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.negotiator.ZopeNegotiator.getLanguage" title="Permalink to this definition">¶</a></dt>
       
   303 <dd></dd></dl>
       
   304 
       
   305 </dd></dl>
       
   306 
       
   307 <dl class="function">
       
   308 <dt id="pyams_i18n.negotiator.get_locale">
       
   309 <code class="descclassname">pyams_i18n.negotiator.</code><code class="descname">get_locale</code><span class="sig-paren">(</span><em>request</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.negotiator.get_locale" title="Permalink to this definition">¶</a></dt>
       
   310 <dd><p>Get zope.i18n locale attribute</p>
       
   311 </dd></dl>
       
   312 
       
   313 <dl class="function">
       
   314 <dt id="pyams_i18n.negotiator.locale_negotiator">
       
   315 <code class="descclassname">pyams_i18n.negotiator.</code><code class="descname">locale_negotiator</code><span class="sig-paren">(</span><em>request</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.negotiator.locale_negotiator" title="Permalink to this definition">¶</a></dt>
       
   316 <dd><p>Negotiate language based on server, browser and user settings</p>
       
   317 </dd></dl>
       
   318 
       
   319 </div>
       
   320 <div class="section" id="module-pyams_i18n.property">
       
   321 <span id="pyams-i18n-property-module"></span><h3>pyams_i18n.property module<a class="headerlink" href="#module-pyams_i18n.property" title="Permalink to this headline">¶</a></h3>
       
   322 <dl class="class">
       
   323 <dt id="pyams_i18n.property.I18nFileProperty">
       
   324 <em class="property">class </em><code class="descclassname">pyams_i18n.property.</code><code class="descname">I18nFileProperty</code><span class="sig-paren">(</span><em>field</em>, <em>name=None</em>, <em>klass=None</em>, <em>**args</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.property.I18nFileProperty" title="Permalink to this definition">¶</a></dt>
       
   325 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
       
   326 <p>I18n property class used to handle files</p>
       
   327 </dd></dl>
       
   328 
       
   329 </div>
       
   330 <div class="section" id="module-pyams_i18n.schema">
       
   331 <span id="pyams-i18n-schema-module"></span><h3>pyams_i18n.schema module<a class="headerlink" href="#module-pyams_i18n.schema" title="Permalink to this headline">¶</a></h3>
       
   332 <dl class="class">
       
   333 <dt id="pyams_i18n.schema.DefaultValueDict">
       
   334 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">DefaultValueDict</code><span class="sig-paren">(</span><em>default=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.DefaultValueDict" title="Permalink to this definition">¶</a></dt>
       
   335 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">persistent.mapping.PersistentMapping</span></code></p>
       
   336 <p>Persistent mapping with default value</p>
       
   337 <dl class="method">
       
   338 <dt id="pyams_i18n.schema.DefaultValueDict.copy">
       
   339 <code class="descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.DefaultValueDict.copy" title="Permalink to this definition">¶</a></dt>
       
   340 <dd></dd></dl>
       
   341 
       
   342 <dl class="method">
       
   343 <dt id="pyams_i18n.schema.DefaultValueDict.get">
       
   344 <code class="descname">get</code><span class="sig-paren">(</span><em>key</em>, <em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.DefaultValueDict.get" title="Permalink to this definition">¶</a></dt>
       
   345 <dd></dd></dl>
       
   346 
       
   347 </dd></dl>
       
   348 
       
   349 <dl class="class">
       
   350 <dt id="pyams_i18n.schema.I18nAudioField">
       
   351 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nAudioField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>value_min_length=None</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nAudioField" title="Permalink to this definition">¶</a></dt>
       
   352 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nMediaField" title="pyams_i18n.schema.I18nMediaField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nMediaField</span></code></a></p>
       
   353 <p>I18n audio field</p>
       
   354 </dd></dl>
       
   355 
       
   356 <dl class="class">
       
   357 <dt id="pyams_i18n.schema.I18nField">
       
   358 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nField" title="Permalink to this definition">¶</a></dt>
       
   359 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">zope.schema._field.Dict</span></code></p>
       
   360 <p>I18n base field class</p>
       
   361 </dd></dl>
       
   362 
       
   363 <dl class="class">
       
   364 <dt id="pyams_i18n.schema.I18nFileField">
       
   365 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nFileField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>value_min_length=None</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nFileField" title="Permalink to this definition">¶</a></dt>
       
   366 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nField" title="pyams_i18n.schema.I18nField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nField</span></code></a></p>
       
   367 <p>I18n file field</p>
       
   368 </dd></dl>
       
   369 
       
   370 <dl class="class">
       
   371 <dt id="pyams_i18n.schema.I18nHTMLField">
       
   372 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nHTMLField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>default=None</em>, <em>value_constraint=None</em>, <em>value_min_length=0</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nHTMLField" title="Permalink to this definition">¶</a></dt>
       
   373 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nField" title="pyams_i18n.schema.I18nField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nField</span></code></a></p>
       
   374 <p>I18n HTML field</p>
       
   375 </dd></dl>
       
   376 
       
   377 <dl class="class">
       
   378 <dt id="pyams_i18n.schema.I18nImageField">
       
   379 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nImageField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>value_min_length=None</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nImageField" title="Permalink to this definition">¶</a></dt>
       
   380 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nMediaField" title="pyams_i18n.schema.I18nMediaField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nMediaField</span></code></a></p>
       
   381 <p>I18n image field</p>
       
   382 </dd></dl>
       
   383 
       
   384 <dl class="class">
       
   385 <dt id="pyams_i18n.schema.I18nMediaField">
       
   386 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nMediaField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>value_min_length=None</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nMediaField" title="Permalink to this definition">¶</a></dt>
       
   387 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nFileField" title="pyams_i18n.schema.I18nFileField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nFileField</span></code></a></p>
       
   388 <p>I18n media field</p>
       
   389 </dd></dl>
       
   390 
       
   391 <dl class="class">
       
   392 <dt id="pyams_i18n.schema.I18nTextField">
       
   393 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nTextField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>default=None</em>, <em>value_constraint=None</em>, <em>value_min_length=0</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nTextField" title="Permalink to this definition">¶</a></dt>
       
   394 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nField" title="pyams_i18n.schema.I18nField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nField</span></code></a></p>
       
   395 <p>I18n text field</p>
       
   396 </dd></dl>
       
   397 
       
   398 <dl class="class">
       
   399 <dt id="pyams_i18n.schema.I18nTextLineField">
       
   400 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nTextLineField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>default=None</em>, <em>value_constraint=None</em>, <em>value_min_length=0</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nTextLineField" title="Permalink to this definition">¶</a></dt>
       
   401 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nField" title="pyams_i18n.schema.I18nField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nField</span></code></a></p>
       
   402 <p>I18n text line field</p>
       
   403 </dd></dl>
       
   404 
       
   405 <dl class="class">
       
   406 <dt id="pyams_i18n.schema.I18nThumbnailImageField">
       
   407 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nThumbnailImageField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>value_min_length=None</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nThumbnailImageField" title="Permalink to this definition">¶</a></dt>
       
   408 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nImageField" title="pyams_i18n.schema.I18nImageField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nImageField</span></code></a></p>
       
   409 <p>I18n thumbnail image field</p>
       
   410 </dd></dl>
       
   411 
       
   412 <dl class="class">
       
   413 <dt id="pyams_i18n.schema.I18nVideoField">
       
   414 <em class="property">class </em><code class="descclassname">pyams_i18n.schema.</code><code class="descname">I18nVideoField</code><span class="sig-paren">(</span><em>key_type=None</em>, <em>value_type=None</em>, <em>value_min_length=None</em>, <em>value_max_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.schema.I18nVideoField" title="Permalink to this definition">¶</a></dt>
       
   415 <dd><p>Bases: <a class="reference internal" href="#pyams_i18n.schema.I18nMediaField" title="pyams_i18n.schema.I18nMediaField"><code class="xref py py-class docutils literal"><span class="pre">pyams_i18n.schema.I18nMediaField</span></code></a></p>
       
   416 <p>I18n video field</p>
       
   417 </dd></dl>
       
   418 
       
   419 </div>
       
   420 <div class="section" id="module-pyams_i18n.site">
       
   421 <span id="pyams-i18n-site-module"></span><h3>pyams_i18n.site module<a class="headerlink" href="#module-pyams_i18n.site" title="Permalink to this headline">¶</a></h3>
       
   422 <dl class="class">
       
   423 <dt id="pyams_i18n.site.I18nGenerationsChecker">
       
   424 <em class="property">class </em><code class="descclassname">pyams_i18n.site.</code><code class="descname">I18nGenerationsChecker</code><a class="headerlink" href="#pyams_i18n.site.I18nGenerationsChecker" title="Permalink to this definition">¶</a></dt>
       
   425 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
       
   426 <p>I18n generations checker</p>
       
   427 <dl class="method">
       
   428 <dt id="pyams_i18n.site.I18nGenerationsChecker.evolve">
       
   429 <code class="descname">evolve</code><span class="sig-paren">(</span><em>site</em>, <em>current=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.site.I18nGenerationsChecker.evolve" title="Permalink to this definition">¶</a></dt>
       
   430 <dd><p>Check for required utilities</p>
       
   431 </dd></dl>
       
   432 
       
   433 <dl class="attribute">
       
   434 <dt id="pyams_i18n.site.I18nGenerationsChecker.generation">
       
   435 <code class="descname">generation</code><em class="property"> = 1</em><a class="headerlink" href="#pyams_i18n.site.I18nGenerationsChecker.generation" title="Permalink to this definition">¶</a></dt>
       
   436 <dd></dd></dl>
       
   437 
       
   438 </dd></dl>
       
   439 
       
   440 <dl class="function">
       
   441 <dt id="pyams_i18n.site.handle_new_local_site">
       
   442 <code class="descclassname">pyams_i18n.site.</code><code class="descname">handle_new_local_site</code><span class="sig-paren">(</span><em>event</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.site.handle_new_local_site" title="Permalink to this definition">¶</a></dt>
       
   443 <dd><p>Create a new negotiator when a site is created</p>
       
   444 </dd></dl>
       
   445 
       
   446 </div>
       
   447 <div class="section" id="module-pyams_i18n.vocabulary">
       
   448 <span id="pyams-i18n-vocabulary-module"></span><h3>pyams_i18n.vocabulary module<a class="headerlink" href="#module-pyams_i18n.vocabulary" title="Permalink to this headline">¶</a></h3>
       
   449 <dl class="class">
       
   450 <dt id="pyams_i18n.vocabulary.I18nContentLanguages">
       
   451 <em class="property">class </em><code class="descclassname">pyams_i18n.vocabulary.</code><code class="descname">I18nContentLanguages</code><span class="sig-paren">(</span><em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.vocabulary.I18nContentLanguages" title="Permalink to this definition">¶</a></dt>
       
   452 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">zope.schema.vocabulary.SimpleVocabulary</span></code></p>
       
   453 <p>I18n content languages vocabulary</p>
       
   454 </dd></dl>
       
   455 
       
   456 <dl class="class">
       
   457 <dt id="pyams_i18n.vocabulary.I18nOfferedLanguages">
       
   458 <em class="property">class </em><code class="descclassname">pyams_i18n.vocabulary.</code><code class="descname">I18nOfferedLanguages</code><span class="sig-paren">(</span><em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_i18n.vocabulary.I18nOfferedLanguages" title="Permalink to this definition">¶</a></dt>
       
   459 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">zope.schema.vocabulary.SimpleVocabulary</span></code></p>
       
   460 <p>I18n offered languages vocabulary</p>
       
   461 </dd></dl>
       
   462 
       
   463 </div>
       
   464 </div>
       
   465 </div>
       
   466 
       
   467 
       
   468           </div>
       
   469         </div>
       
   470       </div>
       
   471       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
       
   472         <div class="sphinxsidebarwrapper">
       
   473   <h3><a href="index.html">Table Of Contents</a></h3>
       
   474   <ul>
       
   475 <li><a class="reference internal" href="#">PyAMS internationalization</a><ul>
       
   476 <li><a class="reference internal" href="#module-pyams_i18n">Module contents</a></li>
       
   477 <li><a class="reference internal" href="#subpackages">Subpackages</a></li>
       
   478 <li><a class="reference internal" href="#submodules">Submodules</a><ul>
       
   479 <li><a class="reference internal" href="#module-pyams_i18n.attr">pyams_i18n.attr module</a></li>
       
   480 <li><a class="reference internal" href="#module-pyams_i18n.column">pyams_i18n.column module</a></li>
       
   481 <li><a class="reference internal" href="#module-pyams_i18n.content">pyams_i18n.content module</a></li>
       
   482 <li><a class="reference internal" href="#module-pyams_i18n.expr">pyams_i18n.expr module</a></li>
       
   483 <li><a class="reference internal" href="#module-pyams_i18n.include">pyams_i18n.include module</a></li>
       
   484 <li><a class="reference internal" href="#module-pyams_i18n.index">pyams_i18n.index module</a></li>
       
   485 <li><a class="reference internal" href="#module-pyams_i18n.language">pyams_i18n.language module</a></li>
       
   486 <li><a class="reference internal" href="#module-pyams_i18n.negotiator">pyams_i18n.negotiator module</a></li>
       
   487 <li><a class="reference internal" href="#module-pyams_i18n.property">pyams_i18n.property module</a></li>
       
   488 <li><a class="reference internal" href="#module-pyams_i18n.schema">pyams_i18n.schema module</a></li>
       
   489 <li><a class="reference internal" href="#module-pyams_i18n.site">pyams_i18n.site module</a></li>
       
   490 <li><a class="reference internal" href="#module-pyams_i18n.vocabulary">pyams_i18n.vocabulary module</a></li>
       
   491 </ul>
       
   492 </li>
       
   493 </ul>
       
   494 </li>
       
   495 </ul>
       
   496 
       
   497 <div id="searchbox" style="display: none" role="search">
       
   498   <h3>Quick search</h3>
       
   499     <form class="search" action="search.html" method="get">
       
   500       <div><input type="text" name="q" /></div>
       
   501       <div><input type="submit" value="Go" /></div>
       
   502       <input type="hidden" name="check_keywords" value="yes" />
       
   503       <input type="hidden" name="area" value="default" />
       
   504     </form>
       
   505 </div>
       
   506 <script type="text/javascript">$('#searchbox').show(0);</script>
       
   507         </div>
       
   508       </div>
       
   509       <div class="clearer"></div>
       
   510     </div>
       
   511     <div class="related" role="navigation" aria-label="related navigation">
       
   512       <h3>Navigation</h3>
       
   513       <ul>
       
   514         <li class="right" style="margin-right: 10px">
       
   515           <a href="genindex.html" title="General Index"
       
   516              >index</a></li>
       
   517         <li class="right" >
       
   518           <a href="py-modindex.html" title="Python Module Index"
       
   519              >modules</a> |</li>
       
   520         <li class="nav-item nav-item-0"><a href="index.html">PyAMS User Guide 0.1.0 documentation</a> &#187;</li> 
       
   521       </ul>
       
   522     </div>
       
   523     <div class="footer" role="contentinfo">
       
   524         &#169; Copyright 2017, Thierry Florac.
       
   525       Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5.
       
   526     </div>
       
   527   </body>
       
   528 </html>