Class LanguageHelper
java.lang.Object
io.goobi.viewer.model.translations.language.LanguageHelper
Provides language metadata loaded from ISO 639 definitions for display and selection purposes.
-
Constructor Summary
ConstructorsConstructorDescriptionLanguageHelper(String configFilePath) Creates a new LanguageHelper instance. -
Method Summary
Modifier and TypeMethodDescriptioncreateLanguage(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> languageConfig) getLanguage(String inIsoCode) Gets the language data for the given iso-code 639-1 or 639-2B.voidshutdown()
-
Constructor Details
-
LanguageHelper
Creates a new LanguageHelper instance.- Parameters:
configFilePath- path to the languages XML configuration file
-
-
Method Details
-
shutdown
public void shutdown() -
getAllLanguages
-
getMajorLanguages
-
getLanguage
Gets the language data for the given iso-code 639-1 or 639-2B.- Parameters:
inIsoCode- ISO 639-1 or 639-2/B language code to look up- Returns:
- the Language data for the given ISO code, or null if not found
-
createLanguage
public Language createLanguage(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> languageConfig) - Parameters:
languageConfig- XML configuration node for a single language entry- Returns:
- Created
Language
-