code: public Map<String, String> getLanguageNames() {
  
          Map<String, String> languageNames = new HashMap<String, String>();
  
          // For each language key/resource pair
          for (Map.Entry<String, Resource> entry : resources.entrySet()) {
  
              // Get language key and resource
              String languageKey = entry.getKey();
              Resource resource = entry.getValue();
  
              // Get stream for resource
              InputStream resourceStream = resource.asStream();
              if (resourceStream == null) {
                  logger.warn("Expected language resource does not exist: \"{}\".", languageKey);
                  continue;
              }
              
              // Get name node of language
              try {
                  JsonNode tree = mapper.readTree(resourceStream);
                  JsonNode nameNode = tree.get(LANGUAGE_DISPLAY_NAME_KEY);
                  
                  // Attempt to read language name from node
                  String languageName;
                  if (nameNode == null || (languageName = nameNode.getTextValue()) == null) {
                      logger.warn("Root-level \"" + LANGUAGE_DISPLAY_NAME_KEY + "\" string missing or invalid in language \"{}\"", languageKey);
                      languageName = languageKey;
                  }
                  
                  // Add language key/name pair to map
                  languageNames.put(languageKey, languageName);
  
              }
  
              // Continue with next language if unable to read
              catch (IOException e) {
                  logger.warn("Unable to read language resource \"{}\".", languageKey);
                  logger.debug("Error reading language resource.", e);
              }
  
          }
          
          return Collections.unmodifiableMap(languageNames);
          
      }
docs: Returns a mapping of all language keys to their corresponding human-
  readable language names. If an error occurs while parsing a language
  resource, its key/name pair will simply be omitted. The returned map
  cannot be modified.
  
  @return
  A map of all language keys and their corresponding human-readable
  names.