From 9e3797a8c3806cdfc99889c651fa34f7c313d81e Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Thu, 4 Feb 2010 12:52:38 +0000 Subject: [PATCH] Translation even if LANG missing or set wrong or None. svn: r14208 --- src/Relationship.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Relationship.py b/src/Relationship.py index 8ae69a9c1..a3bbaf854 100644 --- a/src/Relationship.py +++ b/src/Relationship.py @@ -1790,8 +1790,12 @@ def get_relationship_calculator(reinit=False): lang = os.environ["LANG"] _LANG_SET = True except: + # if LANG is not set import locale lang = locale.getlocale()[0] + if not lang: + # if lang is empty/None + lang = locale.getdefaultlocale()[0] _LANG_SET = False __RELCALC_CLASS = RelationshipCalculator