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
Question on plurals #6
Comments
The magic is tucked away in translations actually (we need to improve our documentation surrounding this). The CLDR number type corresponding to "RU" is IntlCLDRNumberType30. A translator can variate your individual source for a translation for any given token in the source. In the example's case, this would be You can see some examples of gender variations for the hidden token, I also suspect we're missing number variations in our Arabic translation for d47b9415c39a6e5e042244d77c23bb13, but I'm checking on that internally. I'll work on making this clearer in documentation! |
You can see all the variation types available for any given translation leaf here: |
OK. Pulled in more accurate AR translations to highlight number variations. https://github.com/facebookincubator/fbt/blob/master/demo-app/translation_input.json#L1932-L1979 Let me know if you have any more questions around this! |
Hi! Thanks for open sourcing this. Looks exciting!
Plural handling jumped out at me as very basic:
https://facebookincubator.github.io/fbt/docs/plurals
As is, it looks like a simplistic-yet-very-specific one/many handling with support for showing a counter.
Since fbt is used at Facebook (a product with a pretty involved translation) I'm curious if that is actually enough for Facebook itself?
For context, several languages (Russian for example) have many types of plurals. The ICU message syntax is my go-to for supporting these cases:
http://userguide.icu-project.org/formatparse/messages (it is used by FormatJS so should be familiar to users of formatjs projects).
The text was updated successfully, but these errors were encountered: