4844: revert rev17071

svn: r17179
This commit is contained in:
Jérôme Rapinat 2011-04-21 08:47:59 +00:00
parent f9287fd436
commit 39d11f132b

View File

@ -54,9 +54,10 @@ import constfunc
# Constants
#
#-------------------------------------------------------------------------
LANG = ''
if "LANG" in os.environ:
LANG = os.environ["LANG"]
if not constfunc.win():
LANG = locale.getlocale(locale.LC_TIME)[0]
else:
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
# If LANG contains ".UTF-8" use only the part to the left of "."
# Otherwise some date handler will not load.
@ -64,10 +65,8 @@ if ".UTF-8" in LANG.upper():
LANG = LANG.split(".")[0]
if not LANG:
if not constfunc.win():
LANG = locale.getlocale(locale.LC_TIME)[0]
else:
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
if "LANG" in os.environ:
LANG = os.environ["LANG"]
if LANG:
LANG_SHORT = LANG.split('_')[0]