docs: def get_language_from_json(language, key):
      """Finds the given language in a json file."""
  
      file_name = os.path.join(
          os.path.dirname(__file__),
          'languages',
          '{0}.json').format(key.lower())
  
      if os.path.exists(file_name):
          try:
              with open(file_name, 'r', encoding='utf-8') as fh:
                  languages = json.loads(fh.read())
                  if languages.get(language.lower()):
                      return languages[language.lower()]
          except:
              log.traceback(logging.DEBUG)
  
      return None