From c7338a75693614e1f47da865e664ed40813385a8 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Thu, 7 Apr 2011 12:41:50 +0000 Subject: [PATCH] Fix of issue 4812, use of LANG env variable. svn: r17072 --- src/DateHandler/_DateHandler.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/DateHandler/_DateHandler.py b/src/DateHandler/_DateHandler.py index 2b2527394..0a0728dc5 100644 --- a/src/DateHandler/_DateHandler.py +++ b/src/DateHandler/_DateHandler.py @@ -54,14 +54,15 @@ import constfunc # Constants # #------------------------------------------------------------------------- -if not constfunc.win(): - LANG = locale.getlocale(locale.LC_TIME)[0] -else: - LANG = locale.getdefaultlocale(locale.LC_TIME)[0] +LANG = '' +if "LANG" in os.environ: + LANG = os.environ["LANG"] if not 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: LANG_SHORT = LANG.split('_')[0]