ó
v¢oQc           @   s`   d  Z  d Z d d l Z d d l m Z e j d	 k  rJ d d l m Z n  i  Z d d „ Z
 d S(
   sL   
This package contains modules for language-dependent features of Docutils.
t   reStructuredTextiÿÿÿÿN(   t   normalize_language_tagi   i   (   t
   __import__c         C   s  x´ t  |  ƒ D]¦ } | j d d ƒ } | t k r9 t | Sy" t | t ƒ  t ƒ  d d ƒ} WnJ t k
 r§ y" t | t ƒ  t ƒ  d d ƒ} Wq¨ t k
 r£ q q¨ Xn X| t | <| SW| d	 k	 rÛ | j d |  d ƒ n  t d t ƒ  t ƒ  d d ƒ} | t | <| S(
   s£   Return module with language localizations.

    `language_code` is a "BCP 47" language tag.
    If there is no matching module, warn and fall back to English.
    t   -t   _t   leveli   i    s   language "%s" not supported: s+   Docutils-generated text will be in English.t   enN(	   R   t   replacet
   _languagesR   t   globalst   localst   ImportErrort   Nonet   warning(   t   language_codet   reportert   tagt   module(    (    s?   /usr/lib/python2.7/dist-packages/docutils/languages/__init__.pyt   get_language   s(    ""

(   i   i   (   t   __doc__t   __docformat__t   syst   docutils.utilsR   t   version_infot   docutils._compatR   R   R   R   (    (    (    s?   /usr/lib/python2.7/dist-packages/docutils/languages/__init__.pyt   <module>
   s   