6553: Local settings and reports and event editor
Query the environment variables LC_TIME and LANG before resorting to getdefaultlocale() on Win32. svn: r22193
This commit is contained in:
parent
6214d3c1f3
commit
51bedcd46c
@ -57,6 +57,11 @@ import constfunc
|
|||||||
if not constfunc.win():
|
if not constfunc.win():
|
||||||
LANG = locale.getlocale(locale.LC_TIME)[0]
|
LANG = locale.getlocale(locale.LC_TIME)[0]
|
||||||
else:
|
else:
|
||||||
|
if 'LC_TIME' in os.environ:
|
||||||
|
LANG = os.environ['LC_TIME']
|
||||||
|
elif 'LANG' in os.environ:
|
||||||
|
LANG = os.environ['LANG']
|
||||||
|
else:
|
||||||
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
|
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
|
||||||
|
|
||||||
# If LANG contains ".UTF-8" use only the part to the left of "."
|
# If LANG contains ".UTF-8" use only the part to the left of "."
|
||||||
|
Loading…
Reference in New Issue
Block a user