Translation even if LANG missing or set wrong or None.
svn: r14208
This commit is contained in:
parent
8aedb01608
commit
9e3797a8c3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user