You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ldml/tr35-general.md
+28-6Lines changed: 28 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -266,13 +266,13 @@ The key-type `scope="core"` is also useful in menus. For example, if a menu or p
266
266
267
267
**Processing types of locale identifier subtags**
268
268
269
-
When the display name contains "(" or ")" characters (or full-width equivalents), replace them by "\[", "\]" (or full-width equivalents) before adding.
269
+
When both the subtag display name and the \<localePattern\> contain bracket characters, replace the brackets in the subtag display name with their nested bracket equivalents according to the [Nested Bracket Replacement](#Character_Nested_Bracket_Replacement) data.
270
270
271
271
1.**Language.** Match the L subtags against the type values in the `<language>` elements. Pick the element with the most subtags matching. If there is more than one such element, pick the one that has subtypes matching earlier. If there are two such elements, pick the one that is alphabetically less. If there is no match, then further convert L to *canonical form* per **[Part 1, Canonical Unicode Locale Identifiers](tr35.md#Canonical_Unicode_Locale_Identifiers)** and try the preceding steps again. Set LBN to the selected value. Disregard any of the matching subtags in the following processing.
272
272
* If CombineLanguage is false, only choose matches with the language subtag matching.
273
273
2.**Script, Region, Variants.** Where any of these subtags are in L, append the matching element value to LQS.
274
-
3.**T extensions.**Get the value of the `key="h0" type="hybrid"` element, if there is one; otherwise the value of the `<key type="t">` element. Next get the locale display name of the tlang. Join the pair using `<localePattern>`and append to the LQS. Then format and add display names to LQS for any of the remaining tkey-tvalue pairs as described below.
275
-
4.**U extensions.**If there is an attribute value A, process the key-value pair <"u", A> as below and append to LQS. Then format and add display names for each of the remaining key-type pairs as described below.
274
+
3.**U extensions.**If there is an attribute value A, process the key-value pair <"u", A> as below and append to LQS. Then format and add display names for each of the remaining key-type pairs as described below.
275
+
4.**T extensions.**Get the value of the `key="h0" type="hybrid"` element, if there is one; otherwise the value of the `<key type="t">` element. Next get the locale display name of the tlang. Do not use `<localePattern>`; instead, append the subtag display names directly to the LQS. Then format and add display names to LQS for any of the remaining tkey-tvalue pairs as described below.
276
276
5.**Other extensions.** There are currently no such extensions defined. Until such time as there are formats defined for them, append each of the extensions’ subtags to LQS.
277
277
6.**Private Use extensions.** Get the value
278
278
@@ -298,9 +298,9 @@ When the display name contains "(" or ")" characters (or full-width equivalents)
298
298
| es-Cyrl-MX | Spanish (Cyrillic, Mexico) |
299
299
| en-Latn-GB-fonipa-scouse | English (Latin, United Kingdom, IPA Phonetics, Scouse) |
300
300
| en-u-nu-thai-ca-islamic-civil | English (Calendar: islamic-civil, Thai Digits) |
301
-
| hi-u-nu-latn-t-en-h0-hybrid | Hindi (Hybrid: English, Western Digits) |
302
-
| en-u-nu-deva-t-de | English (Transform: German, Devanagari Digits) |
The `nestedBracketReplacement` element indicates a character to be used when two sets of brackets (parentheses) are nested. This currently supports only one level of nesting.
720
+
721
+
Clients should replace the inner bracket pair by substituting the bracket string with the value string. For example, in the string "a ( b ( c ) )", the two inner brackets should be replaced according to the replacements data, resulting in "a ( b [ c ] )".
722
+
723
+
In cases where it is necessary to determine whether the brackets are nested, clients can use the `Bidi_Paired_Bracket_Type` property.
Copy file name to clipboardExpand all lines: docs/ldml/tr35-modifications.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,9 @@ This is a partial document, describing only the changes to the LDML since the pr
34
34
35
35
**Changes in LDML Version 49 (Differences from Version 48.1)**
36
36
37
+
* New section [Nested Bracket Replacement](tr35-general.html#Character_Nested_Bracket_Replacement)
38
+
*[Locale Display Name Algorithm](tr35-general.html#locale_display_name_algorithm) updated to use the nested bracket replacement data and avoid nested parentheses by flattening `-t-` (transform) language names
39
+
37
40
### MessageFormat
38
41
39
42
* The `:currency` and `:percent` functions are now Stable, with the same implementations as previously.
0 commit comments