public String getLanguageKey(String path) {

        // Parse language key from filename
        Matcher languageKeyMatcher = LANGUAGE_KEY_PATTERN.matcher(path);
        if (!languageKeyMatcher.matches())
            return null;

        // Return parsed key
        return languageKeyMatcher.group(1);

    }
Derives a language key from the filename within the given path, if
possible. If the filename is not a valid language key, null is returned.

@param path
    The path containing the filename to derive the language key from.

@return
    The derived language key, or null if the filename is not a valid
    language key.
guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java