Package de.jplag
Class LanguageLoader
java.lang.Object
de.jplag.LanguageLoader
This class contains methods to load
Languages.- Author:
- Dominik Fuchss
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidResets the internal cache of all loaded languagesGet an unmodifiable set of all available languages with their identifiers.Get all languages that are currently in the classpath.getLanguage(String identifier) Load a language that is currently in the classpath by its short name.
-
Method Details
-
getAllAvailableLanguages
Get all languages that are currently in the classpath. The languages will be cached. UseclearCache()to obtain new instances.- Returns:
- the languages as unmodifiable map from identifier to language instance.
-
getLanguage
Load a language that is currently in the classpath by its short name.- Parameters:
identifier- the identifier of the language- Returns:
- the language or an empty optional if no language has been found.
- See Also:
-
getAllAvailableLanguageIdentifiers
Get an unmodifiable set of all available languages with their identifiers.- Returns:
- identifiers of all available languages
- See Also:
-
clearCache
public static void clearCache()Resets the internal cache of all loaded languages
-