HumanLanguages 11.0.1
dotnet add package HumanLanguages --version 11.0.1
NuGet\Install-Package HumanLanguages -Version 11.0.1
<PackageReference Include="HumanLanguages" Version="11.0.1" />
<PackageVersion Include="HumanLanguages" Version="11.0.1" />
<PackageReference Include="HumanLanguages" />
paket add HumanLanguages --version 11.0.1
#r "nuget: HumanLanguages, 11.0.1"
#:package HumanLanguages@11.0.1
#addin nuget:?package=HumanLanguages&version=11.0.1
#tool nuget:?package=HumanLanguages&version=11.0.1
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 MIT 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. |
|
|
SMSwitch
Package Description |
|
|
EarthCountriesInfo
Information about the countries of planet Earth: country names in many languages, international dialling codes, and valid phone number lengths with display formats. |
|
|
EmailSwitch
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.1 | 259 | 2026/8/8 |
| 11.0.0 | 362 | 2026/7/20 |
| 10.3.0 | 111 | 2026/7/19 |
| 10.2.0 | 597 | 2025/11/24 |
| 10.1.0 | 669 | 2025/6/28 |
| 10.0.0 | 1,400 | 2024/7/10 |
| 9.0.0 | 349 | 2024/7/5 |
| 8.2.0 | 217 | 2024/6/22 |
| 8.1.0 | 212 | 2024/6/8 |
| 8.0.0 | 236 | 2024/6/5 |
| 7.0.0 | 477 | 2024/4/23 |
| 6.2.0 | 225 | 2024/4/22 |
| 6.1.0 | 222 | 2024/4/22 |
| 6.0.1 | 219 | 2024/4/22 |
| 6.0.0 | 196 | 2024/4/22 |
| 5.1.1 | 226 | 2024/4/20 |
| 5.1.0 | 213 | 2024/4/15 |