Skip to main content Link Search Menu Expand Document (external link)

resourceToFluent() 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.

Convert a Map of Message data objects into a Fluent.Resource.

Signature:

export declare function resourceToFluent(resource: Map<string, Message>, template?: Fluent.Resource, functionMap?: FunctionMap): Fluent.Resource;

Parameters

Parameter Type Description
resource Map<string, Message>  
template Fluent.Resource (Optional) If set, defines the resource-level comments, message order, and the default variant identifiers for messages.
functionMap FunctionMap (Optional) A mapping of MessageFormat 2 → Fluent function names. The special value FluentMessageRef maps to Fluent message/term references.

Returns:

Fluent.Resource