Closed asmecher closed 3 years ago
The Translator in version 5 is a different package: https://github.com/php-gettext/Translator It uses the same code as in 4.x as you can see here: https://github.com/php-gettext/Translator/blob/master/src/Translator.php#L186
Ah! That explains why I couldn't find it :) Thanks, @oscarotero!
In php-gettext 4.x, PO loading used to parse the Plural-Forms header in order to determine which plural form to apply for a number:
https://github.com/php-gettext/Gettext/blob/4.x/src/Translator.php#L213
See the examples described at https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html.
However, the gettext-php 5.x rewrite appears to discard the list of conditions mapping to each plural translation, i.e.
getPluralForm
is never used to fetch the stored set of rules in forming a translation.