inflector
inflector copied to clipboard
withIrregulars method for InflectorFactory
Adds a new method for the in LanguageInflectorFactory
along with a test for it.
It allows to specify an array of custom Irregular substitutions:
$irregulars = [
['singular1', 'plural1'],
['singular2', 'plural2'],
[...]
];
InflectorFactory::create()->withIrregulars($irregulars)->build();
Should be very useful when a given ruleset is not getting some word right, the user could manually set the words it needs