Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 18.219.25.226
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
python-babel-0.9.6 /
doc /
api /
[ HOME SHELL ]
Name
Size
Permission
Action
api-objects.txt
28.73
KB
-rw-r--r--
babel-module.html
8.79
KB
-rw-r--r--
babel.core-module.html
23.42
KB
-rw-r--r--
babel.core.Locale-class.html
67.38
KB
-rw-r--r--
babel.core.UnknownLocaleError-...
7.81
KB
-rw-r--r--
babel.dates-module.html
34.05
KB
-rw-r--r--
babel.localedata-module.html
10.42
KB
-rw-r--r--
babel.messages-module.html
6.66
KB
-rw-r--r--
babel.messages.catalog-module....
5
KB
-rw-r--r--
babel.messages.catalog.Catalog...
48.08
KB
-rw-r--r--
babel.messages.catalog.Message...
19.95
KB
-rw-r--r--
babel.messages.catalog.Transla...
6.08
KB
-rw-r--r--
babel.messages.checkers-module...
6.48
KB
-rw-r--r--
babel.messages.extract-module....
27.71
KB
-rw-r--r--
babel.messages.frontend-module...
9.14
KB
-rw-r--r--
babel.messages.frontend.Comman...
17.97
KB
-rw-r--r--
babel.messages.frontend.compil...
18
KB
-rw-r--r--
babel.messages.frontend.extrac...
19.74
KB
-rw-r--r--
babel.messages.frontend.init_c...
17.69
KB
-rw-r--r--
babel.messages.frontend.update...
18.76
KB
-rw-r--r--
babel.messages.jslexer-module....
24.12
KB
-rw-r--r--
babel.messages.jslexer.Token-c...
11.49
KB
-rw-r--r--
babel.messages.mofile-module.h...
9.78
KB
-rw-r--r--
babel.messages.plurals-module....
13.51
KB
-rw-r--r--
babel.messages.pofile-module.h...
15.93
KB
-rw-r--r--
babel.numbers-module.html
26.44
KB
-rw-r--r--
babel.numbers.NumberFormatErro...
6.19
KB
-rw-r--r--
babel.support-module.html
5.08
KB
-rw-r--r--
babel.support.Format-class.htm...
22.92
KB
-rw-r--r--
babel.support.LazyProxy-class....
27.34
KB
-rw-r--r--
babel.support.Translations-cla...
22.91
KB
-rw-r--r--
babel.util-module.html
14.88
KB
-rw-r--r--
babel.util.odict-class.html
28.24
KB
-rw-r--r--
class-tree.html
9.4
KB
-rw-r--r--
crarr.png
340
B
-rw-r--r--
epydoc.css
5.53
KB
-rw-r--r--
epydoc.js
10.33
KB
-rw-r--r--
help.html
10.6
KB
-rw-r--r--
identifier-index.html
74.71
KB
-rw-r--r--
index.html
8.79
KB
-rw-r--r--
module-tree.html
6.73
KB
-rw-r--r--
redirect.html
1.89
KB
-rw-r--r--
since-index.html
6.37
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : babel.core.Locale-class.html
<?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>babel.core.Locale</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="babel-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="../index.html">Documentation Index</a></th> </tr></table></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> <a href="babel-module.html">Package babel</a> :: <a href="babel.core-module.html">Module core</a> :: Class Locale </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class Locale</h1><p class="nomargin-top"></p> <pre class="base-tree"> object --+ | <strong class="uidshort">Locale</strong> </pre> <hr /> <p>Representation of a specific locale.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>locale = Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>) <span class="py-prompt">>>> </span>repr(locale) <span class="py-output">'<Locale "en_US">'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>locale.display_name <span class="py-output">u'English (United States)'</span></pre> <p>A <a href="babel.core.Locale-class.html" class="link">Locale</a> object can also be instantiated from a raw locale string:</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>locale = Locale.parse(<span class="py-string">'en-US'</span>, sep=<span class="py-string">'-'</span>) <span class="py-prompt">>>> </span>repr(locale) <span class="py-output">'<Locale "en_US">'</span></pre> <p><a href="babel.core.Locale-class.html" class="link">Locale</a> objects provide access to a collection of locale data, such as territory and language names, number and date format patterns, and more:</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>locale.number_symbols[<span class="py-string">'decimal'</span>] <span class="py-output">u'.'</span></pre> <p>If a locale is requested for which no locale data is available, an <a href="babel.core.UnknownLocaleError-class.html" class="link">UnknownLocaleError</a> is raised:</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale.parse(<span class="py-string">'en_DE'</span>) <span class="py-except">Traceback (most recent call last):</span> <span class="py-except"> ...</span> <span class="py-except">UnknownLocaleError: unknown locale 'en_DE'</span></pre> <hr /> <div class="fields"> <p><strong>See Also:</strong> <a class="rst-reference external" href="http://www.ietf.org/rfc/rfc3066.txt" target="_top">IETF RFC 3066</a> </p> </div><!-- ==================== INSTANCE METHODS ==================== --> <a name="section-InstanceMethods"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Instance Methods</span></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 href="babel.core.Locale-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">language</span>, <span class="summary-sig-arg">territory</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">script</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">variant</span>=<span class="summary-sig-default">None</span>)</span><br /> Initialize the locale object from the given identifier components.</td> <td align="right" valign="top"> </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="__eq__"></a><span class="summary-sig-name">__eq__</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">other</span>)</span></td> <td align="right" valign="top"> </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="__ne__"></a><span class="summary-sig-name">__ne__</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">other</span>)</span></td> <td align="right" valign="top"> </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 href="babel.core.Locale-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br /> repr(x)</td> <td align="right" valign="top"> </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 href="babel.core.Locale-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br /> str(x)</td> <td align="right" valign="top"> </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 href="babel.core.Locale-class.html#get_display_name" class="summary-sig-name">get_display_name</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">locale</span>=<span class="summary-sig-default">None</span>)</span><br /> Return the display name of the locale using the given locale.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: <code>__delattr__</code>, <code>__format__</code>, <code>__getattribute__</code>, <code>__hash__</code>, <code>__new__</code>, <code>__reduce__</code>, <code>__reduce_ex__</code>, <code>__setattr__</code>, <code>__sizeof__</code>, <code>__subclasshook__</code> </p> </td> </tr> </table> <!-- ==================== CLASS METHODS ==================== --> <a name="section-ClassMethods"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Class Methods</span></td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><a href="babel.core.Locale-class.html" class="link">Locale</a></span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.core.Locale-class.html#default" class="summary-sig-name">default</a>(<span class="summary-sig-arg">cls</span>, <span class="summary-sig-arg">category</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">aliases</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">ar</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ar_SY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">bg</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bg_BG</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">bs</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bs_BA</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ca</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ca_ES</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>)</span><br /> Return the system default locale for the specified category.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><a href="babel.core.Locale-class.html" class="link">Locale</a></span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.core.Locale-class.html#negotiate" class="summary-sig-name">negotiate</a>(<span class="summary-sig-arg">cls</span>, <span class="summary-sig-arg">preferred</span>, <span class="summary-sig-arg">available</span>, <span class="summary-sig-arg">sep</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">_</code><code class="variable-quote">'</code></span>, <span class="summary-sig-arg">aliases</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">ar</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ar_SY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">bg</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bg_BG</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">bs</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bs_BA</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ca</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ca_ES</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>)</span><br /> Find the best match between available and requested locale strings.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><a href="babel.core.Locale-class.html" class="link">Locale</a></span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="babel.core.Locale-class.html#parse" class="summary-sig-name">parse</a>(<span class="summary-sig-arg">cls</span>, <span class="summary-sig-arg">identifier</span>, <span class="summary-sig-arg">sep</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">_</code><code class="variable-quote">'</code></span>)</span><br /> Create a <a href="babel.core.Locale-class.html" class="link">Locale</a> instance for the given locale identifier.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> </table> <!-- ==================== PROPERTIES ==================== --> <a name="section-Properties"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Properties</span></td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">unicode</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#display_name" class="summary-name">display_name</a><br /> The localized display name of the locale. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">unicode</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#english_name" class="summary-name">english_name</a><br /> The english display name of the locale. </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: <code>__class__</code> </p> </td> </tr> <tr bgcolor="#e8f0f8" > <th colspan="2" class="group-header" > General Locale Display Names</th></tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#languages" class="summary-name">languages</a><br /> Mapping of language codes to translated language names. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#scripts" class="summary-name">scripts</a><br /> Mapping of script codes to translated script names. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#territories" class="summary-name">territories</a><br /> Mapping of script codes to translated script names. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#variants" class="summary-name">variants</a><br /> Mapping of script codes to translated script names. </td> </tr> <tr bgcolor="#e8f0f8" > <th colspan="2" class="group-header" > Number Formatting</th></tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#currencies" class="summary-name">currencies</a><br /> Mapping of currency codes to translated currency names. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#currency_symbols" class="summary-name">currency_symbols</a><br /> Mapping of currency codes to symbols. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#number_symbols" class="summary-name">number_symbols</a><br /> Symbols used in number formatting. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#decimal_formats" class="summary-name">decimal_formats</a><br /> Locale patterns for decimal number formatting. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#currency_formats" class="summary-name">currency_formats</a><br /> Locale patterns for currency number formatting. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#percent_formats" class="summary-name">percent_formats</a><br /> Locale patterns for percent number formatting. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#scientific_formats" class="summary-name">scientific_formats</a><br /> Locale patterns for scientific number formatting. </td> </tr> <tr bgcolor="#e8f0f8" > <th colspan="2" class="group-header" > Calendar Information and Date Formatting</th></tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#periods" class="summary-name">periods</a><br /> Locale display names for day periods (AM/PM). </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#days" class="summary-name">days</a><br /> Locale display names for weekdays. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#months" class="summary-name">months</a><br /> Locale display names for months. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#quarters" class="summary-name">quarters</a><br /> Locale display names for quarters. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#eras" class="summary-name">eras</a><br /> Locale display names for eras. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#time_zones" class="summary-name">time_zones</a><br /> Locale display names for time zones. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#meta_zones" class="summary-name">meta_zones</a><br /> Locale display names for meta time zones. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#zone_formats" class="summary-name">zone_formats</a><br /> Patterns related to the formatting of time zones. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">int</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#first_week_day" class="summary-name">first_week_day</a><br /> The first day of a week, with 0 being Monday. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">int</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#weekend_start" class="summary-name">weekend_start</a><br /> The day the weekend starts, with 0 being Monday. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">int</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#weekend_end" class="summary-name">weekend_end</a><br /> The day the weekend ends, with 0 being Monday. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">int</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#min_week_days" class="summary-name">min_week_days</a><br /> The minimum number of days in a week so that the week is counted as the first week of a year or month. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#date_formats" class="summary-name">date_formats</a><br /> Locale patterns for date formatting. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#time_formats" class="summary-name">time_formats</a><br /> Locale patterns for time formatting. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">dict</code></span> </td><td class="summary"> <a href="babel.core.Locale-class.html#datetime_formats" class="summary-name">datetime_formats</a><br /> Locale patterns for datetime formatting. </td> </tr> </table> <!-- ==================== METHOD DETAILS ==================== --> <a name="section-MethodDetails"></a> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Method Details</span></td> </tr> </table> <a name="__init__"></a> <div> <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">__init__</span>(<span class="sig-arg">self</span>, <span class="sig-arg">language</span>, <span class="sig-arg">territory</span>=<span class="sig-default">None</span>, <span class="sig-arg">script</span>=<span class="sig-default">None</span>, <span class="sig-arg">variant</span>=<span class="sig-default">None</span>)</span> <br /><em class="fname">(Constructor)</em> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Initialize the locale object from the given identifier components.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>locale = Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>) <span class="py-prompt">>>> </span>locale.language <span class="py-output">'en'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>locale.territory <span class="py-output">'US'</span></pre> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>language</code></strong> - the language code</li> <li><strong class="pname"><code>territory</code></strong> - the territory (country or region) code</li> <li><strong class="pname"><code>script</code></strong> - the script code</li> <li><strong class="pname"><code>variant</code></strong> - the variant code</li> </ul></dd> <dt>Raises:</dt> <dd><ul class="nomargin-top"> <li><code><strong class='fraise'><a href="babel.core.UnknownLocaleError-class.html">UnknownLocaleError</a></strong></code> - if no locale data is available for the requested locale</li> </ul></dd> <dt>Overrides: object.__init__ </dt> </dl> </td></tr></table> </div> <a name="default"></a> <div> <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">default</span>(<span class="sig-arg">cls</span>, <span class="sig-arg">category</span>=<span class="sig-default">None</span>, <span class="sig-arg">aliases</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">ar</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ar_SY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">bg</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bg_BG</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">bs</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bs_BA</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ca</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ca_ES</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>)</span> <br /><em class="fname">Class Method</em> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Return the system default locale for the specified category.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span><span class="py-keyword">for</span> name <span class="py-keyword">in</span> [<span class="py-string">'LANGUAGE'</span>, <span class="py-string">'LC_ALL'</span>, <span class="py-string">'LC_CTYPE'</span>]: <span class="py-more">... </span> os.environ[name] = <span class="py-string">''</span> <span class="py-prompt">>>> </span>os.environ[<span class="py-string">'LANG'</span>] = <span class="py-string">'fr_FR.UTF-8'</span> <span class="py-prompt">>>> </span>Locale.default(<span class="py-string">'LC_MESSAGES'</span>) <span class="py-output"><Locale "fr_FR"></span></pre> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>category</code></strong> - one of the <tt class="rst-docutils literal">LC_XXX</tt> environment variable names</li> <li><strong class="pname"><code>aliases</code></strong> - a dictionary of aliases for locale identifiers</li> </ul></dd> <dt>Returns: <a href="babel.core.Locale-class.html" class="link">Locale</a></dt> <dd>the value of the variable, or any of the fallbacks (<tt class="rst-docutils literal">LANGUAGE</tt>, <tt class="rst-docutils literal">LC_ALL</tt>, <tt class="rst-docutils literal">LC_CTYPE</tt>, and <tt class="rst-docutils literal">LANG</tt>)</dd> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.core-module.html#default_locale" class="link">default_locale</a> </p> </div></td></tr></table> </div> <a name="negotiate"></a> <div> <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">negotiate</span>(<span class="sig-arg">cls</span>, <span class="sig-arg">preferred</span>, <span class="sig-arg">available</span>, <span class="sig-arg">sep</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">_</code><code class="variable-quote">'</code></span>, <span class="sig-arg">aliases</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">ar</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ar_SY</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">bg</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bg_BG</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">bs</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bs_BA</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ca</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">ca_ES</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></span>)</span> <br /><em class="fname">Class Method</em> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Find the best match between available and requested locale strings.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale.negotiate([<span class="py-string">'de_DE'</span>, <span class="py-string">'en_US'</span>], [<span class="py-string">'de_DE'</span>, <span class="py-string">'de_AT'</span>]) <span class="py-output"><Locale "de_DE"></span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale.negotiate([<span class="py-string">'de_DE'</span>, <span class="py-string">'en_US'</span>], [<span class="py-string">'en'</span>, <span class="py-string">'de'</span>]) <span class="py-output"><Locale "de"></span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale.negotiate([<span class="py-string">'de_DE'</span>, <span class="py-string">'de'</span>], [<span class="py-string">'en_US'</span>])</pre> <p>You can specify the character used in the locale identifiers to separate the differnet components. This separator is applied to both lists. Also, case is ignored in the comparison:</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale.negotiate([<span class="py-string">'de-DE'</span>, <span class="py-string">'de'</span>], [<span class="py-string">'en-us'</span>, <span class="py-string">'de-de'</span>], sep=<span class="py-string">'-'</span>) <span class="py-output"><Locale "de_DE"></span></pre> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>preferred</code></strong> - the list of locale identifers preferred by the user</li> <li><strong class="pname"><code>available</code></strong> - the list of locale identifiers available</li> <li><strong class="pname"><code>aliases</code></strong> - a dictionary of aliases for locale identifiers</li> </ul></dd> <dt>Returns: <a href="babel.core.Locale-class.html" class="link">Locale</a></dt> <dd>the <a href="babel.core.Locale-class.html" class="link">Locale</a> object for the best match, or <code class="link">None</code> if no match was found</dd> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.core-module.html#negotiate_locale" class="link">negotiate_locale</a> </p> </div></td></tr></table> </div> <a name="parse"></a> <div> <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">parse</span>(<span class="sig-arg">cls</span>, <span class="sig-arg">identifier</span>, <span class="sig-arg">sep</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">_</code><code class="variable-quote">'</code></span>)</span> <br /><em class="fname">Class Method</em> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Create a <a href="babel.core.Locale-class.html" class="link">Locale</a> instance for the given locale identifier.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>l = Locale.parse(<span class="py-string">'de-DE'</span>, sep=<span class="py-string">'-'</span>) <span class="py-prompt">>>> </span>l.display_name <span class="py-output">u'Deutsch (Deutschland)'</span></pre> <p>If the <code class="link">identifier</code> parameter is not a string, but actually a <a href="babel.core.Locale-class.html" class="link">Locale</a> object, that object is returned:</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale.parse(l) <span class="py-output"><Locale "de_DE"></span></pre> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>identifier</code></strong> - the locale identifier string</li> <li><strong class="pname"><code>sep</code></strong> - optional component separator</li> </ul></dd> <dt>Returns: <a href="babel.core.Locale-class.html" class="link">Locale</a></dt> <dd>a corresponding <a href="babel.core.Locale-class.html" class="link">Locale</a> instance</dd> <dt>Raises:</dt> <dd><ul class="nomargin-top"> <li><code><strong class='fraise'>ValueError</strong></code> - if the string does not appear to be a valid locale identifier</li> <li><code><strong class='fraise'><a href="babel.core.UnknownLocaleError-class.html">UnknownLocaleError</a></strong></code> - if no locale data is available for the requested locale</li> </ul></dd> </dl> <div class="fields"> <p><strong>See Also:</strong> <a href="babel.core-module.html#parse_locale" class="link">parse_locale</a> </p> </div></td></tr></table> </div> <a name="__repr__"></a> <div> <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">__repr__</span>(<span class="sig-arg">self</span>)</span> <br /><em class="fname">(Representation operator)</em> </h3> </td><td align="right" valign="top" > </td> </tr></table> repr(x) <dl class="fields"> <dt>Overrides: object.__repr__ <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <a name="__str__"></a> <div> <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">__str__</span>(<span class="sig-arg">self</span>)</span> <br /><em class="fname">(Informal representation operator)</em> </h3> </td><td align="right" valign="top" > </td> </tr></table> str(x) <dl class="fields"> <dt>Overrides: object.__str__ <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <a name="get_display_name"></a> <div> <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">get_display_name</span>(<span class="sig-arg">self</span>, <span class="sig-arg">locale</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Return the display name of the locale using the given locale.</p> <p>The display name will include the language, territory, script, and variant, if those are specified.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'zh'</span>, <span class="py-string">'CN'</span>, script=<span class="py-string">'Hans'</span>).get_display_name(<span class="py-string">'en'</span>) <span class="py-output">u'Chinese (Simplified Han, China)'</span></pre> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>locale</code></strong> - the locale to use</li> </ul></dd> <dt>Returns:</dt> <dd>the display name</dd> </dl> </td></tr></table> </div> <br /> <!-- ==================== PROPERTY DETAILS ==================== --> <a name="section-PropertyDetails"></a> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Property Details</span></td> </tr> </table> <a name="display_name"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">display_name</h3> <p>The localized display name of the locale.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>).display_name <span class="py-output">u'English'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).display_name <span class="py-output">u'English (United States)'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'sv'</span>).display_name <span class="py-output">u'svenska'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><a href="babel.core.Locale-class.html#get_display_name" class="summary-sig-name">get_display_name</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">locale</span>=<span class="summary-sig-default">None</span>)</span> - Return the display name of the locale using the given locale. </dd> <dt>Type:</dt> <dd><code class="link">unicode</code></dd> </dl> </td></tr></table> </div> <a name="english_name"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">english_name</h3> <p>The english display name of the locale.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>).english_name <span class="py-output">u'German'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).english_name <span class="py-output">u'German (Germany)'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.english_name(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">unicode</code></dd> </dl> </td></tr></table> </div> <a name="languages"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">languages</h3> <p>Mapping of language codes to translated language names.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).languages[<span class="py-string">'ja'</span>] <span class="py-output">u'Japanisch'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.languages(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> <div class="fields"> <p><strong>See Also:</strong> <a class="rst-reference external" href="http://www.loc.gov/standards/iso639-2/" target="_top">ISO 639</a> </p> </div></td></tr></table> </div> <a name="scripts"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">scripts</h3> <p>Mapping of script codes to translated script names.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).scripts[<span class="py-string">'Hira'</span>] <span class="py-output">u'Hiragana'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.scripts(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> <div class="fields"> <p><strong>See Also:</strong> <a class="rst-reference external" href="http://www.evertype.com/standards/iso15924/" target="_top">ISO 15924</a> </p> </div></td></tr></table> </div> <a name="territories"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">territories</h3> <p>Mapping of script codes to translated script names.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'es'</span>, <span class="py-string">'CO'</span>).territories[<span class="py-string">'DE'</span>] <span class="py-output">u'Alemania'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.territories(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> <div class="fields"> <p><strong>See Also:</strong> <a class="rst-reference external" href="http://www.iso.org/iso/en/prods-services/iso3166ma/" target="_top">ISO 3166</a> </p> </div></td></tr></table> </div> <a name="variants"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">variants</h3> <p>Mapping of script codes to translated script names.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).variants[<span class="py-string">'1901'</span>] <span class="py-output">u'Alte deutsche Rechtschreibung'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.variants(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="currencies"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">currencies</h3> <p>Mapping of currency codes to translated currency names.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>).currencies[<span class="py-string">'COP'</span>] <span class="py-output">u'Colombian Peso'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).currencies[<span class="py-string">'COP'</span>] <span class="py-output">u'Kolumbianischer Peso'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.currencies(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="currency_symbols"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">currency_symbols</h3> <p>Mapping of currency codes to symbols.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).currency_symbols[<span class="py-string">'USD'</span>] <span class="py-output">u'$'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'es'</span>, <span class="py-string">'CO'</span>).currency_symbols[<span class="py-string">'USD'</span>] <span class="py-output">u'US$'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.currency_symbols(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="number_symbols"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">number_symbols</h3> <p>Symbols used in number formatting.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'fr'</span>, <span class="py-string">'FR'</span>).number_symbols[<span class="py-string">'decimal'</span>] <span class="py-output">u','</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.number_symbols(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="decimal_formats"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">decimal_formats</h3> <p>Locale patterns for decimal number formatting.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).decimal_formats[None] <span class="py-output"><NumberPattern u'#,##0.###'></span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.decimal_formats(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="currency_formats"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">currency_formats</h3> <p>Locale patterns for currency number formatting.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span><span class="py-keyword">print</span> Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).currency_formats[None] <span class="py-output"><NumberPattern u'\xa4#,##0.00'></span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.currency_formats(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="percent_formats"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">percent_formats</h3> <p>Locale patterns for percent number formatting.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).percent_formats[None] <span class="py-output"><NumberPattern u'#,##0%'></span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.percent_formats(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="scientific_formats"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">scientific_formats</h3> <p>Locale patterns for scientific number formatting.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).scientific_formats[None] <span class="py-output"><NumberPattern u'#E0'></span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.scientific_formats(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="periods"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">periods</h3> <p>Locale display names for day periods (AM/PM).</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).periods[<span class="py-string">'am'</span>] <span class="py-output">u'AM'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.periods(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="days"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">days</h3> <p>Locale display names for weekdays.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).days[<span class="py-string">'format'</span>][<span class="py-string">'wide'</span>][3] <span class="py-output">u'Donnerstag'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.days(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="months"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">months</h3> <p>Locale display names for months.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).months[<span class="py-string">'format'</span>][<span class="py-string">'wide'</span>][10] <span class="py-output">u'Oktober'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.months(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="quarters"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">quarters</h3> <p>Locale display names for quarters.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).quarters[<span class="py-string">'format'</span>][<span class="py-string">'wide'</span>][1] <span class="py-output">u'1. Quartal'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.quarters(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="eras"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">eras</h3> <p>Locale display names for eras.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).eras[<span class="py-string">'wide'</span>][1] <span class="py-output">u'Anno Domini'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).eras[<span class="py-string">'abbreviated'</span>][0] <span class="py-output">u'BC'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.eras(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="time_zones"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">time_zones</h3> <p>Locale display names for time zones.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).time_zones[<span class="py-string">'Europe/London'</span>][<span class="py-string">'long'</span>][<span class="py-string">'daylight'</span>] <span class="py-output">u'British Summer Time'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).time_zones[<span class="py-string">'America/St_Johns'</span>][<span class="py-string">'city'</span>] <span class="py-output">u"St. John's"</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.time_zones(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="meta_zones"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">meta_zones</h3> <p>Locale display names for meta time zones.</p> <p>Meta time zones are basically groups of different Olson time zones that have the same GMT offset and daylight savings time.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).meta_zones[<span class="py-string">'Europe_Central'</span>][<span class="py-string">'long'</span>][<span class="py-string">'daylight'</span>] <span class="py-output">u'Central European Summer Time'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.meta_zones(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> <div class="fields"> <p><strong>Since:</strong> version 0.9 </p> </div></td></tr></table> </div> <a name="zone_formats"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">zone_formats</h3> <p>Patterns related to the formatting of time zones.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).zone_formats[<span class="py-string">'fallback'</span>] <span class="py-output">u'%(1)s (%(0)s)'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'pt'</span>, <span class="py-string">'BR'</span>).zone_formats[<span class="py-string">'region'</span>] <span class="py-output">u'Hor\xe1rio %s'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.zone_formats(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> <div class="fields"> <p><strong>Since:</strong> version 0.9 </p> </div></td></tr></table> </div> <a name="first_week_day"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">first_week_day</h3> <p>The first day of a week, with 0 being Monday.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).first_week_day <span class="py-output">0</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).first_week_day <span class="py-output">6</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.first_week_day(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">int</code></dd> </dl> </td></tr></table> </div> <a name="weekend_start"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">weekend_start</h3> <p>The day the weekend starts, with 0 being Monday.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).weekend_start <span class="py-output">5</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.weekend_start(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">int</code></dd> </dl> </td></tr></table> </div> <a name="weekend_end"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">weekend_end</h3> <p>The day the weekend ends, with 0 being Monday.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).weekend_end <span class="py-output">6</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.weekend_end(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">int</code></dd> </dl> </td></tr></table> </div> <a name="min_week_days"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">min_week_days</h3> <p>The minimum number of days in a week so that the week is counted as the first week of a year or month.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'de'</span>, <span class="py-string">'DE'</span>).min_week_days <span class="py-output">4</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.min_week_days(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">int</code></dd> </dl> </td></tr></table> </div> <a name="date_formats"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">date_formats</h3> <p>Locale patterns for date formatting.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).date_formats[<span class="py-string">'short'</span>] <span class="py-output"><DateTimePattern u'M/d/yy'></span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'fr'</span>, <span class="py-string">'FR'</span>).date_formats[<span class="py-string">'long'</span>] <span class="py-output"><DateTimePattern u'd MMMM yyyy'></span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.date_formats(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="time_formats"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">time_formats</h3> <p>Locale patterns for time formatting.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>, <span class="py-string">'US'</span>).time_formats[<span class="py-string">'short'</span>] <span class="py-output"><DateTimePattern u'h:mm a'></span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'fr'</span>, <span class="py-string">'FR'</span>).time_formats[<span class="py-string">'long'</span>] <span class="py-output"><DateTimePattern u'HH:mm:ss z'></span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.time_formats(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></dd> </dl> </td></tr></table> </div> <a name="datetime_formats"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">datetime_formats</h3> <p>Locale patterns for datetime formatting.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>Locale(<span class="py-string">'en'</span>).datetime_formats[None] <span class="py-output">u'{1} {0}'</span> <span class="py-output"></span><span class="py-prompt">>>> </span>Locale(<span class="py-string">'th'</span>).datetime_formats[None] <span class="py-output">u'{1}, {0}'</span></pre> <dl class="fields"> <dt>Get Method:</dt> <dd class="value"><span class="summary-sig"><i>unreachable</i>.datetime_formats(<span class="summary-sig-arg">self</span>)</span> </dd> <dt>Type:</dt> <dd><code class="link">dict</code></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="babel-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="../index.html">Documentation Index</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.0.1 on Thu Mar 17 15:12:44 2011 </td> <td align="right" class="footer"> <a target="mainFrame" 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>
Close