While most Fluent translations can be written as regular text without delimiters, quoted text (delimited by double quotes) is used to insert characters that have special meaning in Fluent's syntax.
Common use cases for quoted text include:
- Inserting curly braces: Since
{ and } are used for placeables, use {"{"} or {"}"} to include literal braces. - Preserving leading whitespace: Use
{" "} at the start of a message to prevent Fluent from stripping leading blanks. - Preventing attribute/variant triggers: If a line starts with a dot (
.), star (*), or bracket ([), Fluent may interpret it as an attribute or variant. Wrap these characters in quoted text within a placeable (e.g., {"["}) to treat them as literal text.
Note: Quoted text cannot contain interpolations/placeables itself; it is treated as a literal string when interpolated into regular text via the {"..."} syntax.
opening-brace = This message features an opening curly brace: {"{"}.
closing-brace = This message features a closing curly brace: {"}"}.
blank-is-removed = This message starts with no blanks.
blank-is-preserved = {" "}This message starts with 4 spaces.
leading-bracket =
This message has an opening square bracket
at the beginning of the third line:
{"["}.
attribute-how-to =
To add an attribute to this messages, write
{".attr = Value"} on a new line.
.attr = An actual attribute (not part of the text value above)