Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plural and number format combination #65

Closed
felicoz opened this issue Aug 11, 2023 · 2 comments
Closed

Plural and number format combination #65

felicoz opened this issue Aug 11, 2023 · 2 comments

Comments

@felicoz
Copy link

felicoz commented Aug 11, 2023

Hi, I have search through the google and github and no luck with a solution so I start an thread to ask.

Shop {numOfItems, plural, =1 {1 Item} other {# Items}}

My goal is to have number and plural formation together from a key:
English: Shop 10,000 Items
French: Shop 10 000 Items

But I am getting the following at the moment:
English: Shop 10,000 Items
French: Shop 10,000 Items

Is that possible? currently seems like I can only do either number or plural or currency separately.

"i18next": "^20.3.5",
"i18next-browser-languagedetector": "^6.1.3",
"i18next-chained-backend": "^4.2.0",
"i18next-http-backend": "^2.2.1",
"i18next-icu": "^2.0.3",
"i18next-localstorage-backend": "^4.1.1",
"next-i18next": "^12.1.0",

If I try to localize the number myself, the final result becomes a string "10,000" and won't be able use the ICU plural format.

thanks!

@adrai adrai closed this as completed Aug 11, 2023
@felicoz
Copy link
Author

felicoz commented Aug 11, 2023

oops my bad, it does work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants