Translation formatting

Hey, I need a help with translation {count, plural, =0{no memories} one{{formattedCount} memory} other{{formattedCount} memories}} How should I format this correctly if the Czech language uses different terms for 0, 1, 2-4, and 5+ memories? 0 - žádné vzpomínky 1 - 1 vzpomínka 2-4 - X vzpomínky 5+ - X vzpomínek
7 Replies
Ducky
Ducky3mo ago
I'm sorry, I couldn't find the answer in the documentation. -# If your issue is resolved, feel free to use the /solved command to close this thread. If you'd like to ask me another question use /docsearch
vishnu
vishnu3mo ago
@Prateek would you by any chance know how this works?
Prateek
Prateek3mo ago
According to Czech plural rules in ICU, you can use format like this: "memories": "{count, plural, =0{žádné vzpomínky} one{{formattedCount} vzpomínka} few{{formattedCount} vzpomínky} other{{formattedCount} vzpomínek}}" =0 is 0 one is 1 few is considered 2-4 other is 5+ -# gpt ftw
DaWe
DaWeOP3mo ago
amazing, thank you
Ducky
Ducky3mo ago
-# If your issue is resolved, you can use the /solved command to close the thread. If not, use /unsolve to cancel. Thread has been reopened and unmarked as solved.
DaWe
DaWeOP3mo ago
and what about this? {count, plural, =0{Soon} =1 {1 day} other {{count} days}} will {count, plural, =0{Brzy} =1{1 den} few{{count} dny} other{{count} dní}} work? nvm, figured it out, thanks again 😄
Ducky
Ducky3mo ago
Thread marked as solved. It will be closed in <t:1755861536:R>. This thread is now closed.

Did you find this page helpful?