<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>web2py.gluon.languages</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="web2py.gluon-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
Package web2py ::
<a href="web2py.gluon-module.html">Package gluon</a> ::
Module languages
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="web2py.gluon.languages-module.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module languages</h1><span class="codelink"><a href="web2py.gluon.languages-pysrc.html">source code</a></span><br /><br />
This file is part of the web2py Web Framework Copyrighted by Massimo
Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3
(http://www.gnu.org/licenses/lgpl.html)<br /><br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.languages.lazyT-class.html" class="summary-name">lazyT</a><br />
never to be called explicitly, returned by
translator.__call__
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.languages.translator-class.html" class="summary-name">translator</a><br />
this class is instantiated by gluon.compileapp.build_environment
as the T object
</td>
</tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Functions</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Functions"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="read_dict_aux"></a><span class="summary-sig-name">read_dict_aux</span>(<span class="summary-sig-arg">filename</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.languages-pysrc.html#read_dict_aux">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="read_dict"></a><span class="summary-sig-name">read_dict</span>(<span class="summary-sig-arg">filename</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.languages-pysrc.html#read_dict">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="web2py.gluon.languages-module.html#utf8_repr" class="summary-sig-name">utf8_repr</a>(<span class="summary-sig-arg">s</span>)</span><br />
# note that we use raw strings to avoid having to use double back
slashes below</td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.languages-pysrc.html#utf8_repr">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="write_dict"></a><span class="summary-sig-name">write_dict</span>(<span class="summary-sig-arg">filename</span>,
<span class="summary-sig-arg">contents</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.languages-pysrc.html#write_dict">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="findT"></a><span class="summary-sig-name">findT</span>(<span class="summary-sig-arg">path</span>,
<span class="summary-sig-arg">language</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">en-us</code><code class="variable-quote">'</code></span>)</span><br />
must be run by the admin app</td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.languages-pysrc.html#findT">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="lazyT_unpickle"></a><span class="summary-sig-name">lazyT_unpickle</span>(<span class="summary-sig-arg">data</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT_unpickle">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="lazyT_pickle"></a><span class="summary-sig-name">lazyT_pickle</span>(<span class="summary-sig-arg">data</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.languages-pysrc.html#lazyT_pickle">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="update_all_languages"></a><span class="summary-sig-name">update_all_languages</span>(<span class="summary-sig-arg">application_path</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.languages-pysrc.html#update_all_languages">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="is_gae"></a><span class="summary-name">is_gae</span> = <code title="1">1</code><br />
PyMySQL: A pure-Python drop-in replacement for MySQLdb.
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.languages-module.html#PY_STRING_LITERAL_RE" class="summary-name">PY_STRING_LITERAL_RE</a> = <code title="'(?<=[^\\w]T\\()(?P<name>[uU]?[rR]?(?:\'\'\'(?:[^\']|\'{1,2}(?!\'))*\'\
\'\')|(?:\'(?:[^\'\\\\]|\\\\.)*\')|(?:"""(?:[^"]|"{1,2}(?!"))*""")|(?:\
"(?:[^"\\\\]|\\\\.)*"))'"><code class="variable-quote">'</code><code class="variable-string">(?<=[^\\w]T\\()(?P<name>[uU]?[rR]?(?:\</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.languages-module.html#regex_translate" class="summary-name">regex_translate</a> = <code title="re.compile(r'(?s)(?<=[^\w]T\()(?P<name>[uU]?[rR]?(?:\'\'\'(?:[^\']|\'{\
1,2}(?!\'))*\'\'\')|(?:\'(?:[^\'\\]|\\.)*\')|(?:"""(?:[^"]|"{1,2}(?!")\
)*""")|(?:"(?:[^"\\]|\\.)*"))')">re.compile(r'<code class="re-flags">(?s)</code><code class="re-group">(?<=</code><code class="re-group">[</code><code class="re-op">^</code>\w<code class="re-group">]</code>T\(<code class="re-group">)</code><code class="re-group">(?P<</code><code class="re-ref">name</code><code class="re-group">></code><code class="re-group">[</code>uU<code class="re-group">]</code><code class="re-op">?</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.languages-module.html#regex_language" class="summary-name">regex_language</a> = <code title="re.compile(r'^[a-zA-Z]{2}(-[a-zA-Z]{2})?(-[a-zA-Z]+)?$')">re.compile(r'^<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">(</code>-<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code>-<code class="re-group">[</code>a<code class="re-op">-</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Function Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-FunctionDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="utf8_repr"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">utf8_repr</span>(<span class="sig-arg">s</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="web2py.gluon.languages-pysrc.html#utf8_repr">source code</a></span>
</td>
</table>
<p># note that we use raw strings to avoid having to use double back
slashes below</p>
<p>utf8_repr() works same as repr() when processing ascii string
>>> utf8_repr('abc') == utf8_repr("abc") ==
repr('abc') == repr("abc") == "'abc'" True
>>> utf8_repr('a"b"c') == repr('a"b"c') ==
'\'a"b"c\'' True >>> utf8_repr("a'b'c") ==
repr("a'b'c") == '"a\'b\'c"' True >>>
utf8_repr('a\'b"c') == repr('a\'b"c') ==
utf8_repr("a'b\"c") == repr("a'b\"c") ==
'\'a\\\'b"c\'' True >>> utf8_repr('a\r\nb') ==
repr('a\r\nb') == "'a\\r\\nb'" # Test for \r, \n True</p>
Unlike repr(), utf8_repr() remains utf8 content when processing utf8
string >>> utf8_repr('中文字') == utf8_repr("中文字") ==
"'中文字'" != repr('中文字') True >>>
utf8_repr('中"文"字') == "'中\"文\"字'" !=
repr('中"文"字') True >>> utf8_repr("中'文'字") ==
'"中\'文\'字"' != repr("中'文'字") True >>>
utf8_repr('中\'文"字') == utf8_repr("中'文\"字") ==
'\'中\\\'文"字\'' != repr('中\'文"字') ==
repr("中'文\"字") True >>> utf8_repr('中\r\n文') ==
"'中\\r\\n文'" != repr('中\r\n文') # Test for \r, \n True
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-VariablesDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="PY_STRING_LITERAL_RE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">PY_STRING_LITERAL_RE</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">(?<=[^\\w]T\\()(?P<name>[uU]?[rR]?(?:\'\'\'(?:[^\']|\'{1,2}(?!\'))*\'</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">\'\')|(?:\'(?:[^\'\\\\]|\\\\.)*\')|(?:"""(?:[^"]|"{1,2}(?!"))*""")|(?:</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">"(?:[^"\\\\]|\\\\.)*"))</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="regex_translate"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">regex_translate</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?s)</code><code class="re-group">(?<=</code><code class="re-group">[</code><code class="re-op">^</code>\w<code class="re-group">]</code>T\(<code class="re-group">)</code><code class="re-group">(?P<</code><code class="re-ref">name</code><code class="re-group">></code><code class="re-group">[</code>uU<code class="re-group">]</code><code class="re-op">?</code><code class="re-group">[</code>rR<code class="re-group">]</code><code class="re-op">?</code><code class="re-group">(?:</code>\'\'\'<code class="re-group">(?:</code><code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">|</code>\'<code class="re-op">{</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-op">1,2}</code><code class="re-group">(?!</code>\'<code class="re-group">)</code><code class="re-group">)</code><code class="re-op">*</code>\'\'\'<code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(?:</code>\'<code class="re-group">(?:</code><code class="re-group">[</code><code class="re-op">^</code>\'\\<code class="re-group">]</code><code class="re-op">|</code>\\.<code class="re-group">)</code><code class="re-op">*</code>\'<code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(?:</code>"""<code class="re-group">(?:</code><code class="re-group">[^</code>"<code class="re-group">]</code><code class="re-op">|</code>"<code class="re-op">{1,2}</code><code class="re-group">(?!</code>"<code class="re-group">)</code><code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">)</code><code class="re-op">*</code>"""<code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(?:</code>"<code class="re-group">(?:</code><code class="re-group">[</code><code class="re-op">^</code>"\\<code class="re-group">]</code><code class="re-op">|</code>\\.<code class="re-group">)</code><code class="re-op">*</code>"<code class="re-group">)</code><code class="re-group">)</code>')
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="regex_language"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">regex_language</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
re.compile(r'^<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">(</code>-<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(</code>-<code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-op">?</code>$')
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="web2py.gluon-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0beta1 on Thu Aug 4 00:46:59 2011
</td>
<td align="right" class="footer">
<a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie()
// -->
</script>
</body>
</html>