Repository URL to install this package:
Version:
4.0.111 ▾
|
ó ôEYc @ sá d Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z i Z e j Z e j j e j j e d Z d Z d Z d Z e d Z d Z d e f d YZ d e f d YZ d S( sB babel.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. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. iÿÿÿÿN( t MutableMapping( t chain( t pickles locale-datac C sO | j j } x6 t j t t g D] } | | j k r+ | Sq+ Wd S( s Normalize a locale ID by stripping spaces and apply proper casing. Returns the normalized locale ID string or `None` if the ID is not recognized. N( t stript lowerR t from_iterablet _cachet locale_identifiers( t namet locale_id( ( sE /home/tvault/.virtenv/lib/python2.7/site-packages/babel/localedata.pyt normalize_locale s c C sO | t k r t St j j t j j t d | } | r? t St t | S( s¥ Check whether locale data is available for the given locale. Returns `True` if it exists, `False` otherwise. :param name: the locale identifier string s %s.dat( R t Truet ost patht existst joint _dirnamet boolR ( R t file_found( ( sE /home/tvault/.virtenv/lib/python2.7/site-packages/babel/localedata.pyR ( s %c C s] g g t j t D] } t j j | ^ q D]* \ } } | d k r/ | d k r/ | ^ q/ S( s¦ Return a list of all locale identifiers for which locale data is available. .. versionadded:: 0.8.1 :return: a list of locale identifiers (strings) s .datt root( R t listdirR R t splitext( t filenamet stemt extension( ( sE /home/tvault/.virtenv/lib/python2.7/site-packages/babel/localedata.pyR 5 s 8c C sS t j z7t j | } | s<| d k s5 | r>