Class LanguageHelper

java.lang.Object
io.goobi.viewer.model.translations.language.LanguageHelper

public class LanguageHelper extends Object
Provides language metadata loaded from ISO 639 definitions for display and selection purposes.
  • Constructor Details

    • LanguageHelper

      public LanguageHelper(String configFilePath)
      Creates a new LanguageHelper instance.
      Parameters:
      configFilePath - path to the languages XML configuration file
  • Method Details

    • shutdown

      public void shutdown()
    • getAllLanguages

      public List<Language> getAllLanguages()
    • getMajorLanguages

      public List<Language> getMajorLanguages()
    • getLanguage

      public Language getLanguage(String inIsoCode)
      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