Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withIrregulars method for InflectorFactory #196

Open
wants to merge 2 commits into
base: 2.0.x
Choose a base branch
from

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
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.

None yet

1 participant