Optional
fallbackMapping from a locale to a corresponding fallback locale.
For example, let's consider fallbackLocales set to:
{
'ru-RU': 'ru',
'en-US': 'en',
'ru': 'en'
}
In this case:
ru-RU
locale, then compiler would look for ru
locale.ru
locale isn't supported as well then a compiler would fall back to en
locale.en
isn't supported as well then null
would be returned from a message function when called with ru-RU
locale.Optional
getReturns the TypeScript type for a given argument.
Optional
hashNumber of characters in a message body hash.
Optional
packageThe name of the package from to which compiled messages are written.
Parser that converts a MFML text message to an MFML AST.
Optional
postprocessorsThe array of callbacks that are run after the message was parsed as an MFML AST.
Preprocessors can be used to validate messages, rename arguments, or for other AST-based transformations.
Optional
preprocessorsThe array of callbacks that are run before message parsing.
Preprocessors can be used to transform Markdown messages to HTML, or other text-based transformations.
Optional
renameReturns the name of a message function for the given message key.
Options of createCompiler.