Locale: Deal with locale initialisation more safely
This commit is contained in:
parent
0049cfbd3c
commit
2c8f219c50
|
@ -34,8 +34,8 @@ import Configuration
|
|||
import Exceptions
|
||||
|
||||
import locale
|
||||
lang=locale.getdefaultlocale()[0][0:2]
|
||||
if lang=="en":
|
||||
(lang, charset) = locale.getdefaultlocale()
|
||||
if lang = None or lang == "en":
|
||||
def _(string): return string
|
||||
else:
|
||||
import gettext
|
||||
|
|
Loading…
Reference in New Issue
Block a user