Python 3.4.3 (default, Apr 13 2015, 22:30:47)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import babel
>>> babel.__version__
'2.0'
>>> from babel.core import Locale
>>> Locale.parse('zh_CN')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/venv/py34/lib/python3.4/site-packages/babel/core.py", line 286, in parse
language = get_global('language_aliases').get(language, language)
File "/venv/py34/lib/python3.4/site-packages/babel/core.py", line 58, in get_global
_global_data = pickle.load(fileobj)
TypeError: an integer is required (got type str)
>>>
Locale.parse('zh_CN') should work and load zh_CN localedata.
On Python 2.7, it works fine.
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import babel
>>> babel.__version__
'2.0'
>>> from babel.core import Locale
>>> Locale.parse('zh_CN')
Locale('zh', territory='CN', script='Hans')
>>>