def bindtextdomain(app_name, locale_dir=None):
 try:
  import locale
  import gettext
  gettext.bindtextdomain(app_name, locale_dir)
  gettext.textdomain(app_name)
  gettext.install(app_name, locale_dir, unicode=1)
 except (IOError, locale.Error) as e:
  print(u'Warning', app_name, e)
  __builtins__.__dict__[u'_'] = (lambda x: x)

def bindtextdomain ( app_name , locale_dir = None ) : try : import locale import gettext gettext . bindtextdomain ( app_name , locale_dir ) gettext . textdomain ( app_name ) gettext . install ( app_name , locale_dir , unicode = 1 ) except ( IOError , locale . Error ) as e : print ( u'Warning' , app_name , e ) __builtins__ . __dict__ [ u'_' ] = ( lambda x : x )
bind the domain represented by app_name to the locale directory locale_dir .