docs/installation.md
Humanizer is available as NuGet packages with different language support options:
dotnet add package Humanizer
This package includes all supported languages and pulls in Humanizer.Core plus all language satellite packages.
dotnet add package Humanizer.Core
This package includes only English language support, resulting in a smaller download size.
You can install Humanizer.Core along with specific language packages:
dotnet add package Humanizer.Core
dotnet add package Humanizer.Core.fr # French
dotnet add package Humanizer.Core.es # Spanish
dotnet add package Humanizer.Core.de # German
# Add as many language packages as needed
Available language packages include: af, ar, az, bg, bn, ca, cs, da, de, el, es, fa, fi, fil, fr, he, hr, hu, hy, id, is, it, ja, ko, ku, lb, lt, lv, ms, mt, nb, nl, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-Latn, sv, th, tr, uk, uz-Cyrl-UZ, uz-Latn-UZ, vi, zh-CN, zh-Hans, zh-Hant.
Humanizer supports the following .NET target frameworks:
Note: While .NET Framework versions 4.6.1 through 4.7.2 can technically consume netstandard2.0 libraries, they are not officially supported by Humanizer and may not work correctly. Use one of the explicitly supported frameworks above.
[!IMPORTANT] The
Humanizermetapackage requires the NuGet locale parsing fix shipped in .NET SDK 9.0.200 and corresponding Visual Studio/MSBuild updates.Restore operations must run on:
- .NET SDK 9.0.200 or newer, OR
- Visual Studio 2022/MSBuild versions that include the locale parsing patch
Older SDKs/MSBuild versions will fail to restore the metapackage because they do not recognize three-letter locale identifiers.
Workaround for older tooling: Reference
Humanizer.Coredirectly and add desiredHumanizer.Core.<locale>satellite packages individually.
Humanizer symbols are source-indexed with SourceLink and included in the package. This means you can step through Humanizer's source code while debugging your own application.
After installation, verify Humanizer is working:
using Humanizer;
"PascalCaseString".Humanize(); // Returns "Pascal case string"
DateTime.UtcNow.AddHours(-2).Humanize(); // Returns "2 hours ago"