1
- # MessageFormat 2.0 Unicode Namespace
1
+ # MessageFormat Unicode Namespace
2
2
3
3
The ` u: ` _ namespace_ is reserved for the definition of _ options_
4
4
which affect the _ function context_ of the specific _ expressions_
@@ -12,15 +12,26 @@ manages the specification for this namespace, hence the _namespace_ `u:`.
12
12
13
13
## Options
14
14
15
- This section describes common ** _ <dfn >` u: ` options</dfn >_ ** which each implementation SHOULD support
16
- for all _ functions_ and _ markup_ .
15
+ This section describes ** _ <dfn >` u: ` options</dfn >_ ** .
16
+ When implemented, they apply to all _ functions_ and _ markup_ ,
17
+ including user-defined _ functions_ in that implementation.
17
18
18
19
### ` u:id `
19
20
21
+ Implementations providing a formatting target other than a concatenated string
22
+ SHOULD support this option.
23
+
20
24
A string value that is included as an ` id ` or other suitable value
21
25
in the formatted parts for the _ placeholder_ ,
22
26
or any other structured formatted results.
23
27
28
+ > For example, ` u:id ` could be used to distinguish
29
+ > two otherwise matching placeholders from each other:
30
+ >
31
+ > ```
32
+ > The first number was {$a :number u:id=first} and the second {$b :number u:id=second}.
33
+ > ```
34
+
24
35
Ignored when formatting a message to a string.
25
36
26
37
The value of the `u:id` _option_ MUST be a _literal_ or a
@@ -31,6 +42,12 @@ and the `u:id` option is ignored.
31
42
32
43
### `u:locale`
33
44
45
+ > [!IMPORTANT]
46
+ > This _option_ has a status of **Draft**.
47
+ > It is proposed for inclusion in a future release and is not Stable.
48
+
49
+ Implementations MAY support this option.
50
+
34
51
Replaces the _locale_ defined in the _function context_ for this _expression_.
35
52
36
53
A comma-delimited list consisting of
@@ -67,6 +84,8 @@ not valid, or some other reason.
67
84
68
85
### ` u:dir `
69
86
87
+ Implementations SHOULD support this option.
88
+
70
89
Replaces the base directionality defined in
71
90
the _ function context_ for this _ expression_
72
91
and applies bidirectional isolation to it.
0 commit comments