-
I want to keep the content of number-like string value. For examples: import IntlMessageFormat from 'intl-messageformat';
const message = new IntlMessageFormat(
'Playing at {num, plural, one {# time} other {# times}} speed',
'en-US',
);
console.log(message.format({ num: '1.0' }));
console.log(message.format({ num: '1.5' }));
console.log(message.format({ num: '2.0' })); output:
expected:
|
Beta Was this translation helpful? Give feedback.
Answered by
longlho
Mar 12, 2022
Replies: 1 comment 7 replies
-
you need to explicitly specify the number format options. Decimals do affect plural rules in some languages |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
tmkx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you need to explicitly specify the number format options. Decimals do affect plural rules in some languages