You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
There has been work done to try to add a formatter based on the Intl extension to Symfony (#20007) but it's currently blocked because it's hard to do it without breaking BC.
In many languages (for example, in Russian) the words in phrases use different forms depending on gender and count. For example, in this phrase:
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?
The text was updated successfully, but these errors were encountered: