On linux we can use locale -a
to see the list of locales available.
$ locale -a
C
C.UTF-8
en_US.utf8
POSIX
Is it possible to do the same from python console on windows?
This can be handy when you try to do locale.setlocale(locale.LC_ALL, '???')
and simply don't know the name of the locale value.
the richest locale support i found in python is babel.
please install by:
then,
there is also extensive support for common terms translation etc. babel is being used in various other packages.
hth, alex
You can look up available locale names on MSDN.
You have to pass the long version from "Language string" in the MSDN list as value to
setlocale
. The default L10N short codes likeen_EN
which are inlocale_alias
do NOT work in general.I have already extracted some of them as dictionary: