private void serveLanguageResources(Map<String, Resource> resources) {

        // Add all resources to language resource service
        for (Map.Entry<String, Resource> translationResource : resources.entrySet()) {

            // Get path and resource from path/resource pair
            String path = translationResource.getKey();
            Resource resource = translationResource.getValue();

            // Derive key from path
            String languageKey = languageResourceService.getLanguageKey(path);
            if (languageKey == null) {
                logger.warn("Invalid language file name: \"{}\"", path);
                continue;
            }

            // Add language resource
            languageResourceService.addLanguageResource(languageKey, resource);

        }

    }
Serves each of the given resources as a language resource. Language
resources are served from within the "/translations" directory as JSON
files, where the name of each JSON file is the language key.

@param resources
    A map of all language resources to serve, where the key of each
    entry in the language key from which the name of the JSON file will
    be derived.
guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java