3 ms·
Thank you for your reply, it is exactly what I am looking for. Fortunately we have some people here able to do the translation. We're looking at formatjs.io f
by edweis 2y ago
Thank you for your reply, it is exactly what I am looking for.
Fortunately we have some people here able to do the translation.
We're looking at formatjs.io for the react librairy.
- david_allison 2y agoThanks for the nerd snipe! I'd strongly recommend against it. 1) They've incorrectly documented most of their plural rules, it's like they didn't bother to read the spec (and it's an easy spec to read). > one: This category is used for languages that have grammar specialized specifically for one item. Many languages, but not all, use this plural category. (Many popular Asian languages, such as Chinese and Japanese, do not use this category.) https://formatjs.io/docs/core-concepts/icu-syntax#plural-format https://formatjs.io/docs/core-concepts/icu-syntax#plural-for... > These categories are only mnemonics -- the names don't necessarily imply the exact contents of the category. > This is worth emphasizing: A common mistake is to think that "one" is only for only the number 1. Instead, "one" is a category for any number that behaves like 1. So in some languages, for example, one → numbers that end in "1" (like 1, 21, 151) but that don't end in 11 (like "11, 111, 10311). https://cldr.unicode.org/index/cldr-spec/plural-rules#h.ukir5vdcl36e https://cldr.unicode.org/index/cldr-spec/plural-rules#h.ukir... 2) That example is trivial. They've only bothered with 8 languages and most are uninteresting. 3) Using currency as the standard numerical example is correct, but questionable.
- edweis 2y agoYour definitely know your stuff ! For now as a POC we simply are using the t() function with a translation file. We'll see which features are important for us and we'll deep dive when needs be. Thank you for your insight, I understand that translation is hard :)