messageToFluent() function
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Convert a Message data object into a Fluent.Pattern (i.e. the value of a Fluent message or an attribute).
Signature:
export declare function messageToFluent(msg: Message, defaultKey?: string, functionMap?: FunctionMap): Fluent.Pattern;
Parameters
Parameter | Type | Description |
---|---|---|
msg | Message | |
defaultKey | string | (Optional) The Fluent identifier or numeric literal to use for the default/fallback variant, which is labelled as * in MessageFormat 2, when not explicitly defined in the data. |
functionMap | FunctionMap | (Optional) A mapping of MessageFormat 2 → Fluent function names. The special value FluentMessageRef maps to Fluent message/term references. |
Returns:
Fluent.Pattern