The generated parse(src, [options]) function takes two parameters, first the
string to be parsed, and a second optional parameter options, an object with
the following possible keys:
cardinal and ordinal – Arrays of valid plural categories for the current
locale, used to validate plural and selectordinal keys. If these are
missing or set to false, the full set of valid Unicode CLDR keys is used:
'zero', 'one', 'two', 'few', 'many', 'other'. To disable this check, pass in
an empty array.
strictFunctionParams – By default, function parameters are split on commas
and trimmed, so the parameters in {x,fn, a, b } are parsed as
['a','b']. Setting strictFunctionParams to true will make the parser
follow the ICU MessageFormat spec more closely, and result in a params array
with a single element: [' a, b '].
strictNumberSign – Inside a plural or selectordinal statement, a pound
symbol (#) is replaced with the input number. By default, # is also parsed
as a special character in nested statements too, and can be escaped using
apostrophes ('#'). Setting strictNumberSign to true will make the parser
follow the ICU MessageFormat spec more closely, and only parse # as a
special character directly inside a plural or selectordinal statement.
Outside those, # and '#' will be parsed as literal text.
The parser only supports the default DOUBLE_OPTIONALapostrophe mode. A
single apostrophe only starts quoted literal text if preceded by a curly brace
({}) or a pound symbol (#) inside a plural or selectordinal statement,
depending on the value of strictNumberSign. Otherwise, it is a literal
apostrophe. A double apostrophe is always a literal apostrophe.