Snippets

Marc Schlaich 8nxR: Untitled snippet

Created by Marc Schlaich last modified
In [7]: locale.setlocale(locale.LC_ALL, 'english')
Out[7]: 'English_United States.1252'

In [8]: locale.setlocale(locale.LC_ALL, 'Chinese')
Out[8]: "Chinese (Simplified)_People's Republic of China.936"

In [9]: locale.setlocale(locale.LC_ALL, 'en')
---------------------------------------------------------------------------
Error                                     Traceback (most recent call last)
<ipython-input-9-6c8cd92a13f4> in <module>()
----> 1 locale.setlocale(locale.LC_ALL, 'en')

C:\Users\schlaich\.virtualenvs\main\lib\locale.pyc in setlocale(category, locale)
    577         # convert to string
    578         locale = normalize(_build_localename(locale))
--> 579     return _setlocale(category, locale)
    580
    581 def resetlocale(category=LC_ALL):

Error: unsupported locale setting

In [11]: locale.setlocale(locale.LC_ALL, 'en_EN')
---------------------------------------------------------------------------
Error                                     Traceback (most recent call last)
<ipython-input-11-3470f6014f94> in <module>()
----> 1 locale.setlocale(locale.LC_ALL, 'en_EN')

C:\Users\schlaich\.virtualenvs\main\lib\locale.pyc in setlocale(category, locale)
    577         # convert to string
    578         locale = normalize(_build_localename(locale))
--> 579     return _setlocale(category, locale)
    580
    581 def resetlocale(category=LC_ALL):

Error: unsupported locale setting

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.