Skip to content

Conversation

cesarep
Copy link
Contributor

@cesarep cesarep commented Apr 17, 2022

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

@cesarep cesarep force-pushed the irregular-patch branch 2 times, most recently from f8d6df5 to 9791640 Compare April 17, 2022 15:50
@greg0ire greg0ire changed the base branch from 2.0.x to 2.1.x August 10, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant