Runtime Utilities
Bundled with fbt come a few useful utilities for constructing strings.
intlList(...)
intlList
creates fbt
instances with selectable conjunctions given an array.
As an example
produces the fbt
recursively combining fbts.
Note that genders are not used in this fbt:param
instances, so they default to UNKNOWN
intlNumUtils and intlSummarizeNumber
There are a few utilities in both intlNumUtils
and
intlSummarizeNumber
that are documented in the source.
In fact fbt::param
and fbt::plural
default to displaying numbers
using intlNumUtils::formatNumberWithThousandDelimiters
.
You can override this behavior in fbt:param
by setting the
number option and using your own
string in the replacement.
You can override this in fbt::plural
by providing the value
option.
createElement
We use this function internally to generate HTML for FBT.