Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | no |
Symfony version | irrelevant |
In many languages (for example, in Russian) the words in phrases use different forms depending on gender and count. For example, in this phrase:
Ivan has shared 5 files and 3 documents.
in Russian the word "shared" has two forms depending on user's gender and words "files" and "documents" depend on numbers before them. Currently Symfony Translation has no support for this. The method transChoice() is too limited and is not usable in many cases.
PHP Intl extension has formatMessage method that can handle such cases. Formatting syntax. But it requires to embed pluralization rules in every translated message. This can be solved by using "select" instead of "plural" and delegating choice to an external function.
So the question is, would not it make more sense to use Intl's formatter as default?