HumanLanguages 11.0.0
dotnet add package HumanLanguages --version 11.0.0
NuGet\Install-Package HumanLanguages -Version 11.0.0
<PackageReference Include="HumanLanguages" Version="11.0.0" />
<PackageVersion Include="HumanLanguages" Version="11.0.0" />
<PackageReference Include="HumanLanguages" />
paket add HumanLanguages --version 11.0.0
#r "nuget: HumanLanguages, 11.0.0"
#:package HumanLanguages@11.0.0
#addin nuget:?package=HumanLanguages&version=11.0.0
#tool nuget:?package=HumanLanguages&version=11.0.0
HumanLanguages
HumanLanguages is an open-source C# class library that provides a comprehensive database of human language names. It knows the name of every supported language in every supported language — 240 languages, fully cross-translated — plus locale/script variations and helpers for parsing ISO-style codes like en-US or da_DK.
Features
- Language names: the name of any language, written in any other language.
- Native names (endonyms): every language's own name for itself.
- Locale variations: per-language region and script variations (e.g.
en-GB,sr-Cyrl) with native display names. - Parsing: turn strings like
"da-DK"or"da_DK"into strongly typed codes. - No dependencies: plain data and enums, nothing else.
Getting Started
Install the NuGet package:
dotnet add package HumanLanguages
Usage
Parse a language code
using HumanLanguages;
var isoCode = HumanHelper.CreateLanguageIsoCode("da-DK"); // '-' and '_' both work, case-insensitive
Console.WriteLine(isoCode.LanguageId); // da
Console.WriteLine(isoCode.LanguageLocaleVariationCode); // DK
Console.WriteLine(isoCode.ToIsoCodeString()); // "da-DK"
Console.WriteLine(isoCode.ToIsoCodeString('_')); // "da_DK"
Null, empty or unrecognized input falls back to English (en, Default).
Get a language's name in another language
var danish = Languages.LanguagePropertiesDictionary[LanguageId.da];
Console.WriteLine(danish.LanguageNames[LanguageId.en]); // "Danish"
Console.WriteLine(danish.LanguageNames[LanguageId.fr]); // "danois"
Console.WriteLine(danish.LanguageNames[LanguageId.ja]); // "デンマーク語"
Console.WriteLine(danish.LanguageNames[LanguageId.da]); // "dansk" (its own name)
List all languages with their native names
foreach (var languageId in Enum.GetValues<LanguageId>())
{
var properties = Languages.LanguagePropertiesDictionary[languageId];
Console.WriteLine($"{languageId}: {properties.LanguageNames[languageId]}");
}
// aa: Afar
// af: Afrikaans
// ...
// zu: isiZulu
Locale and script variations
var english = Languages.LanguagePropertiesDictionary[LanguageId.en];
Console.WriteLine(english.VariationNativeNames[LanguageLocaleVariationCode.GB]); // "United Kingdom"
var serbian = HumanHelper.CreateLanguageIsoCode("sr-Cyrl");
var serbianProperties = Languages.LanguagePropertiesDictionary[serbian.LanguageId];
Console.WriteLine(serbianProperties.VariationNativeNames[serbian.LanguageLocaleVariationCode]); // "ћирилица (Cyrillic)"
Contributing
We welcome contributions! If you find a bug, have an idea for improvement, or want to add support for additional languages, please submit an issue or a pull request on GitHub: https://github.com/prmeyn/HumanLanguages
License
This project is licensed under the GNU GENERAL PUBLIC LICENSE.
Happy coding! 🚀🌐📚
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on HumanLanguages:
| Package | Downloads |
|---|---|
|
GeoIpServices
A C# library that provides geolocation information for IP addresses with MongoDB caching. Wraps third-party IP geolocation services (IpStack) to reduce API usage and costs through intelligent caching and session management. |
|
|
SMSwitch
Package Description |
|
|
EarthCountriesInfo
Package Description |
|
|
EmailSwitch
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0 | 104 | 7/20/2026 |
| 10.3.0 | 88 | 7/19/2026 |
| 10.2.0 | 593 | 11/24/2025 |
| 10.1.0 | 661 | 6/28/2025 |
| 10.0.0 | 1,398 | 7/10/2024 |
| 9.0.0 | 346 | 7/5/2024 |
| 8.2.0 | 213 | 6/22/2024 |
| 8.1.0 | 209 | 6/8/2024 |
| 8.0.0 | 230 | 6/5/2024 |
| 7.0.0 | 474 | 4/23/2024 |
| 6.2.0 | 224 | 4/22/2024 |
| 6.1.0 | 218 | 4/22/2024 |
| 6.0.1 | 217 | 4/22/2024 |
| 6.0.0 | 193 | 4/22/2024 |
| 5.1.1 | 223 | 4/20/2024 |
| 5.1.0 | 211 | 4/15/2024 |