Link Search Menu Expand Document

compileMF1Message() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Compile an ICU MessageFormat 1 message into a MessageFormat instance.

A runtime provided by getMF1Runtime is automatically used in these instances.


export declare function compileMF1Message(source: string | Message, locale: string, { strict, ...opt }?: MF1Options & MessageFormatOptions): MessageFormat;


Parameter Type Description
source string | Message An ICU MessageFormat message, either as its string contents, or as a Message data structure.
locale string The locale code to use for the message.
{ strict, …opt } MF1Options & MessageFormatOptions (Optional)