Skip to content

sarathkcm/Pluralize.NET

Repository files navigation

GitHub license Build status Coverage Status NuGet NuGet

What is it?

This is a C# port of Blake Embrey's pluralize library which helps in pluralizing or singularizing any English word.

Why

I could not find a good C# alternative for converting words from singular to plural and vice versa. System.Data.Entity.Design.PluralizationServices.PluralizationService and Humanizer library did not meet the expectations (try 'shoes' or 'toes'). However this small but awesome Javascript libray pluralize worked very well for me and I decided to convert the code to C# and use it.

How

Install from NuGet

Using Package manager console

Install-Package Pluralize.NET

Using dotnet CLI

dotnet add package Pluralize.NET

Using paket CLI

paket add Pluralize.NET

Include using directive

using Pluralize.NET

Write code

var singular = new Pluralizer().Singularize("Horses");
var plural = new Pluralizer().Pluralize("Horse");

Profit!

Supported .NET Versions

The Nuget package supports the following .NET versions. This pretty much covers versions 4.0 and above. Please open an issue if you want to support any .NET version in particular.

  • .NET 4.0
  • .NET Standard 1.1
  • .NET 4.5.1
  • .NET 4.6
  • .NET Standard 2.0

Licence

MIT - because the original project is MIT