code: def init_i18n (loc=None):
      
      if 'LOCPATH' in os.environ:
          locdir = os.environ['LOCPATH']
      else:
          locdir = os.path.join(get_install_data(), 'share', 'locale')
      i18n.init(configdata.name.lower(), locdir, loc=loc)
      # install translated log level names
      import logging
      logging.addLevelName(logging.CRITICAL, _('CRITICAL'))
      logging.addLevelName(logging.ERROR, _('ERROR'))
      logging.addLevelName(logging.WARN, _('WARN'))
      logging.addLevelName(logging.WARNING, _('WARNING'))
      logging.addLevelName(logging.INFO, _('INFO'))
      logging.addLevelName(logging.DEBUG, _('DEBUG'))
      logging.addLevelName(logging.NOTSET, _('NOTSET'))
docs: Initialize i18n with the configured locale dir. The environment
      variable LOCPATH can also specify a locale dir.
  
      @return: None