Class AmberscriptLangUtil

java.lang.Object
org.opencastproject.transcription.amberscript.AmberscriptLangUtil

public final class AmberscriptLangUtil extends Object
Manages the available Amberscript languages and helps with finding the right code for a given language string.
  • Method Details

    • getInstance

      public static AmberscriptLangUtil getInstance()
      Singleton method
    • getLanguageCodeOrNull

      public String getLanguageCodeOrNull(String languageWithRandomFormat)
      Tries to determine which amberscript language code should be taken for a given language name or code.
      Returns:
      the amberscript language code or null if nothing was found.
    • addCustomMapping

      public void addCustomMapping(String customKey, String amberscriptLangCode)
      Adds a custom mapping entry. Can be configured in the amberscript config file.
      Parameters:
      customKey - The key
      amberscriptLangCode - Amberscript Language Code