Plurally is a .Net Standard-compatabile replacement to the entity framework pluralization services. Provides methods to test if a word is plural or singular, and convert between plural and singular words.
The constructor accepts an optional CultureInfo
type during initialization. If
no CultureInfo
is supplied, Plurally will default to CultureInfo.CurrentCulture
.
Determines if the specified word is plural.
new Pluralizer().IsPlural("Pluralizers")
>> True
Determines if the specified word is singular.
new Pluralizer().IsSingular("Pluralizer")
>> True
Pluralize the specified word. If a word is already plural it will be returned. Case will be (attempted) maintained.
new Pluralizer().Pluralize("Pluralizer")
>> "Pluralizers"
Singularize the specified word. If a word is already singular it will be returned. Case will be (attempted) maintained.
new Pluralizer().Pluralize("Pluralizers")
>> "Pluralizer"
Current support is limited to English alone. To add additional languages please open a pull request with a new locale.