Change locale.getlocale() to locale.getdefaultlocale()
This commit is contained in:
parent
dd6781656c
commit
0f111e643a
@ -35,8 +35,8 @@ class StringBundle:
|
|||||||
def get_bundle(cls, locale_str=None):
|
def get_bundle(cls, locale_str=None):
|
||||||
if locale_str is None:
|
if locale_str is None:
|
||||||
try:
|
try:
|
||||||
locale_str = locale.getlocale()[0] if locale.getlocale() and len(
|
locale_str = locale.getdefaultlocale()[0] if locale.getdefaultlocale() and len(
|
||||||
locale.getlocale()) > 0 else os.getenv('LANG')
|
locale.getdefaultlocale()) > 0 else os.getenv('LANG')
|
||||||
except:
|
except:
|
||||||
print('Invalid locale')
|
print('Invalid locale')
|
||||||
locale_str = 'en'
|
locale_str = 'en'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user