Class AmberscriptLangUtil
java.lang.Object
org.opencastproject.transcription.amberscript.AmberscriptLangUtil
Manages the available Amberscript languages and helps with finding the
right code for a given language string.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomMapping(String customKey, String amberscriptLangCode) Adds a custom mapping entry.static AmberscriptLangUtilSingleton methodgetLanguageCodeOrNull(String languageWithRandomFormat) Tries to determine which amberscript language code should be taken for a given language name or code.
-
Method Details
-
getInstance
Singleton method -
getLanguageCodeOrNull
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
Adds a custom mapping entry. Can be configured in the amberscript config file.- Parameters:
customKey- The keyamberscriptLangCode- Amberscript Language Code
-