Translation even if LANG missing or set wrong or None.

svn: r14208
This commit is contained in:
Peter Landgren 2010-02-04 12:52:38 +00:00
parent 8aedb01608
commit 9e3797a8c3

View File

@ -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