1 | # Author: David Goodger |
---|
2 | # Contact: goodger@users.sourceforge.net |
---|
3 | # Revision: $Revision: 2224 $ |
---|
4 | # Date: $Date: 2004-06-05 21:40:46 +0200 (Sat, 05 Jun 2004) $ |
---|
5 | # Copyright: This module has been placed in the public domain. |
---|
6 | |
---|
7 | # Internationalization details are documented in |
---|
8 | # <http://docutils.sf.net/docs/howto/i18n.html>. |
---|
9 | |
---|
10 | """ |
---|
11 | This package contains modules for language-dependent features of |
---|
12 | reStructuredText. |
---|
13 | """ |
---|
14 | |
---|
15 | __docformat__ = 'reStructuredText' |
---|
16 | |
---|
17 | _languages = {} |
---|
18 | |
---|
19 | def get_language(language_code): |
---|
20 | if _languages.has_key(language_code): |
---|
21 | return _languages[language_code] |
---|
22 | try: |
---|
23 | module = __import__(language_code, globals(), locals()) |
---|
24 | except ImportError: |
---|
25 | return None |
---|
26 | _languages[language_code] = module |
---|
27 | return module |
---|