cldr
cldr copied to clipboard
CLDR-13651 Add spec text involving compact long currency format
CLDR-13651
- [ ] This PR completes the ticket.
ALLOW_MANY_COMMITS=true
@macchiati The proposed algorithm doesn't seem to work correctly for the example data in the spec.
Let's hold off on this for now; we need to work in the decimals and the spacing. We can also test against the data for the locales we have.
On Wed, Sep 25, 2024, 22:49 Shane F. Carr @.***> wrote:
@.**** commented on this pull request.
In docs/ldml/tr35-numbers.md https://github.com/unicode-org/cldr/pull/4077#discussion_r1776419839:
@@ -407,6 +407,8 @@ Formatting 1200 in USD would result in “1.2 K $”, while 990 implicitly maps
The short format is designed for UI environments where space is at a premium, and should ideally result in a formatted string no more than about 6 em wide (with no fractional digits).
+When
currencyFormatLengthis not included for a desired format length (short or long), the currency should be formatted without compact notation and then substituted as the numeric value into the correspondingdecimalFormatLength, adjusting for the number of 0s. For example, using the above data, 12000 USD in compact long format would result in “12 $ mille”.No, that's not the algorithm I understood from the ticket and our CLDR-WG discussion. The algorithm I understood was:
- otherwise:
- Adjust the numeric value according to compact currency rules. For example, 20034.56 EUR becomes 20.03456c3, and after rounding becomes 20c3
- Format the mantissa using <currencyFormat type="standard">, as in "20€"
- Substitute that value into the correct compact currency form (the one corresponding to "c3"), as in "20€ mille"
However, maybe your algorithm is better; at least it works in French, and my algorithm doesn't :)
— Reply to this email directly, view it on GitHub https://github.com/unicode-org/cldr/pull/4077#discussion_r1776419839, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJLEMEUTGGT3VUBBDK2TILZYON7ZAVCNFSM6AAAAABO3C2ECGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMZQGE3TQMBVGU . You are receiving this because you were assigned.Message ID: @.***>