Closed ghost closed 3 years ago
// locale.json { "ALBUM": { "HOME": "You have {num, plural, =1 {one photo.} other {# photos.}}", "RED_HOME": "You have {num, plural, one {one photo.} other {# photos.}}" } }
<div>{intl.get("ALBUM.HOME", { num: 1 })}</div> <div>{intl.get("ALBUM.RED_HOME", { num: 1 })}</div>
You have one photo. You have one photo.
You have one photo. You have 1 photos.
https://codesandbox.io/s/react-intl-universal-example-forked-6bclw?file=/src/Plural.js
Don't use as below:
"You have {num, plural, one {one photo.} other {# photos.}}"
Or downgrade version to < 2.3.0, for example, 2.2.5
Please use this format:
{ "PHOTO": "You have {num, plural, =0 {no photos.} =1 {one photo.} other {# photos.}}" }
Case
code list
result
Reproduce Example
https://codesandbox.io/s/react-intl-universal-example-forked-6bclw?file=/src/Plural.js
Temp Solution
Don't use as below:
Or downgrade version to < 2.3.0, for example, 2.2.5