A2uiMessageFormatter


fun interface A2uiMessageFormatter


Interface to format messages with arguments using the ICU MessageFormat syntax.

The implementation of this interface should be provided by the platform (e.g., using android.icu.text.MessageFormat or com.ibm.icu.text.MessageFormat).

Summary

Public functions

String
format(pattern: String, locale: Locale, arguments: Map<StringAny>)

Formats the specified pattern using the given locale and arguments.

Public functions

format

fun format(pattern: String, locale: Locale, arguments: Map<StringAny>): String

Formats the specified pattern using the given locale and arguments.

Implementations should ignore extra keys in arguments that are not present in the pattern. If a key required by the pattern is missing from arguments, the implementation should throw an exception.

Parameters
pattern: String

the message format pattern in ICU MessageFormat syntax

locale: Locale

the locale to use for formatting

arguments: Map<StringAny>

the map of arguments to replace in the pattern

Returns
String

the formatted string