Fix of issue 4812, use of LANG env variable.

svn: r17072
This commit is contained in:
Peter Landgren 2011-04-07 12:41:50 +00:00
parent 0cbeb502e9
commit c7338a7569

View File

@ -54,14 +54,15 @@ import constfunc
# Constants # Constants
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
if not constfunc.win(): LANG = ''
LANG = locale.getlocale(locale.LC_TIME)[0] if "LANG" in os.environ:
else: LANG = os.environ["LANG"]
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
if not LANG: if not LANG:
if "LANG" in os.environ: if not constfunc.win():
LANG = os.environ["LANG"] LANG = locale.getlocale(locale.LC_TIME)[0]
else:
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
if LANG: if LANG:
LANG_SHORT = LANG.split('_')[0] LANG_SHORT = LANG.split('_')[0]