create
fun create(objectMapper: ObjectMapper, templateFunction: LocalizationTemplateFunction, folderName: String, extensions: List<String>, classLoader: ClassLoader = JacksonLocalizationMapReader::class.java.classLoader): JacksonLocalizationMapReader(source)
Constructs a JacksonLocalizationMapReader with the given template function.
The bundles are read using the folderName and extensions, in the specified classLoader, note that folders are not explored recursively.
Parameters
objectMapper
Object mapper with support for any data format (such as JSON, YAML and TOML)
templateFunction
Function returning a LocalizationTemplate from the template string and locale
folderName
Path where the bundles can be found, cannot start with /
extensions
Extensions which the bundles can use
classLoader
Where to load the resources from, useful if the bundles are in a different named module
Throws
If folderName starts with a /
, or extensions is empty