function
fun FluentBundleBuilder.function(id: String, fn: (List<FluentValue>, FluentArgs) -> FluentValue): FluentBundleBuilder(source)
Register a custom function callable from FTL patterns.
function("HELLO") { args, _ -> FluentValue.Str("Hi ${args.firstOrNull()?.asString()}") }Content copied to clipboard