PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` babel.localedata
Package babel :: Module localedata

Module localedata

Low-level locale data access.

Note: The Locale class, which uses this module under the hood, provides a more convenient interface for accessing the locale data.

Functions
bool
exists(name)
Check whether locale data is available for the given locale.
list
list()
Return a list of all locale identifiers for which locale data is available.
dict
load(name, merge_inherited=True)
Load the locale data for the given locale.
Function Details

exists(name)

 
Check whether locale data is available for the given locale.
Parameters:
  • name - the locale identifier string
Returns: bool
True if the locale data exists, False otherwise

list()

 
Return a list of all locale identifiers for which locale data is available.
Returns: list
a list of locale identifiers (strings)

Since: version 0.8.1

load(name, merge_inherited=True)

 

Load the locale data for the given locale.

The locale data is a dictionary that contains much of the data defined by the Common Locale Data Repository (CLDR). This data is stored as a collection of pickle files inside the babel package.

>>> d = load('en_US')
>>> d['languages']['sv']
u'Swedish'

Note that the results are cached, and subsequent requests for the same locale return the same dictionary:

>>> d1 = load('en_US')
>>> d2 = load('en_US')
>>> d1 is d2
True
Parameters:
  • name - the locale identifier string (or "root")
  • merge_inherited - whether the inherited data should be merged into the data of the requested locale
Returns: dict
the locale data
Raises:
  • IOError - if no locale data file is found for the given locale identifer, or one of the locales it inherits from