Skip to content

Commit b84743e

Browse files
authored
Update README.md
1 parent eae9c24 commit b84743e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,21 @@ var countryInfo = countryProvider.GetCountryByName("Germany");
8989
//countryInfo...
9090
```
9191

92+
### Get country via CountryName and consider Country Translation
93+
94+
Require the translation package `Install-Package Nager.Country.Translation`
95+
96+
```cs
97+
ICountryProvider countryProvider = new CountryProvider();
98+
var countryInfo = countryProvider.GetCountryByNameConsiderTranslation("Germania"); // <- Germany
99+
//countryInfo.Alpha2Code -> DE
100+
//countryInfo.Alpha3Code -> DEU
101+
//countryInfo.NumericCode -> 276
102+
//countryInfo.Region -> Europe
103+
//countryInfo.SubRegion -> WesternEurope
104+
//countryInfo...
105+
```
106+
92107
### Get the name of the country in the requested language ([nuget -> Nager.Country.Translation](https://www.nuget.org/packages/Nager.Country.Translation))
93108
```cs
94109
ITranslationProvider translationProvider = new TranslationProvider();

0 commit comments

Comments
 (0)