import os, sys
-__LANG__=os.getenv("LANG")
+
+try:
+ __LANG__ = os.environ["LANG"] # original locale
+except:
+ __LANG__ = "en_US.utf8" #default
+
__FR__={
"This script requires the Image, ImageDraw and ImageFont libraries":
"Ce script a besoin de Image, ImageDraw et ImageFont python librairies",
# load resources for internationalization
gettext.install("salomeTools", os.path.join(srcdir, "i18n"))
-_LANG = os.environ["LANG"] # original locale
+try:
+ _LANG = os.environ["LANG"] # original locale
+except:
+ _LANG = "en_US.utf8" #default
# The possible hooks :
# pre is for hooks to be executed before commands