| title | MessageFormatOptions |
|---|---|
| parent | @messageformat/core |
| grand_parent | API Reference |
Options for the MessageFormat constructor
Signature:
export interface MessageFormatOptions<ReturnType extends 'string' | 'values' = 'string' | 'values'> | Property | Modifiers | Type | Description |
|---|---|---|---|
| biDiSupport? | boolean | (Optional) Add Unicode control characters to all input parts to preserve the integrity of the output when mixing LTR and RTL text Default: |
|
| currency? | string | (Optional) The currency to use when formatting Default: |
|
| customFormatters? | { [key: string]: CustomFormatter | { formatter: CustomFormatter; arg?: 'string' | 'raw' | 'options'; id?: string; module?: string | ((locale: string) => string); }; } | (Optional) Map of custom formatting functions to include. See Custom Formatters for more details. | |
| localeCodeFromKey? | ((key: string) => string | null | undefined) | null | (Optional) If defined, used by compileModule() to identify and map keys to the locale identifiers used by formatters and plural rules. The values returned by the function should match the Default: |
|
| requireAllArguments? | boolean | (Optional) Require all message arguments to be set with a defined value Default: |
|
| returnType? | ReturnType | (Optional) Return type of compiled functions; either a concatenated Default: |
|
| strict? | boolean | (Optional) Follow the ICU MessageFormat spec more closely, but not allowing custom formatters and by allowing Default: |
|
| strictPluralKeys? | boolean | (Optional) Enable strict checks for plural keys according to Unicode CLDR. When set to Default: |
|
| timeZone? | string | (Optional) The time zone to use when formatting Default: |