Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.82 KB

README.md

File metadata and controls

53 lines (36 loc) · 1.82 KB

Locale Names

NuGet NuGet Coverage Status CodeFactor

.NET library providing localized language names and country names.

The translation data are generated from CLDR locale data for internationalization.

Usage

Find all language codes

var allLanguageCodes = LocaleTranslationsFactory.ForLanguageCode("en-US").AllLanguageCodes;

Find language name

var translatedLanguageName = LocaleTranslationsFactory.ForCultureInfo(new CultureInfo("en-US")).FindLanguageName("cs-CZ");

Find language code

var languageCode = LocaleTranslationsFactory.ForCultureInfo(new CultureInfo("en-US")).FindLanguageCode("Czech");

Find all country codes

var allCountryCodes = LocaleTranslationsFactory.ForLanguageCode("en-US").AllCountryCodes;

Find country name

var translatedCountryName = LocaleTranslationsFactory.ForCultureInfo(new CultureInfo("en-US")).FindCountryName("DE");

Find country code

var countryCode = LocaleTranslationsFactory.ForCultureInfo(new CultureInfo("en-US")).FindCountryCode("Germany");

Stats

Alt

Contributing

Contributions are welcome. Feel free to file issues and pull requests on the repo.