-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
Context
Messages can be defined with variable replacements or match selectors which contain functions.
E.g. message with a plurals function (from MESDK-77 here):
.input {$numProducts}
.match {$numProducts :plural}
zero {{No Products}}
one {{A product}}
other {{{$numProducts} products}}
(this example uses MF2, but inlang v2 Message type semantics are the same)
@loris.sigrist has implementated a registry here as an example to be used by paraglide-js
Requirements for the function registry
- list the available built-in functions (see MF2 default registry)
- plurals (e.g. as implemented by javascript Intl.PluralRules)
- string, number and date formatting functions
- inlude types for function parameters
Proposal
[add api proposal here]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels