Skip to content

Commit 5724461

Browse files
committed
Optimize documentation
1 parent 7236814 commit 5724461

File tree

3 files changed

+75
-24
lines changed

3 files changed

+75
-24
lines changed

doc/README.md

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,68 @@
1-
# Nager.Country
1+
# 🌍 Nager.Country – Worldwide Country Information
22

3-
The Worldwirde Country Informations are available over the nuget package. The collection contains the Informations for 250 Countries.
3+
**Nager.Country** provides a comprehensive dataset of **worldwide country information**, designed for developers who need reliable and structured country-related data.
4+
5+
The dataset includes **250 countries and territories** with detailed information such as:
6+
7+
- ✅ Official country names
8+
- 🌐 ISO 3166 Alpha-2, Alpha-3, and numeric country codes
9+
- 💱 Associated currencies and ISO 4217 currency codes
10+
- 🗣️ Official and spoken languages (ISO 639)
11+
- 🌍 Continent and subregion classification
12+
- 🌐 Country borders
13+
- 🌏 Translations in multiple languages
14+
15+
## 🌐 Optional Package – `Nager.Country.Translation`
416

517
> If you need the translations of the countries you will find in the further nuget package [Nager.Country.Translation](https://www.nuget.org/packages/Nager.Country.Translation)
618
719
## Code Examples
820

9-
### Get CountryInfo - Germany via Alpha2Code
10-
11-
ICountryProvider countryProvider = new CountryProvider();
12-
var countryInfo = countryProvider.GetCountry(Alpha2Code.DE);
13-
//countryInfo.CommonName -> Germany
14-
//countryInfo.Alpha3Code -> DEU
15-
//countryInfo.NumericCode -> 276
16-
//countryInfo.Region -> Europe
17-
//countryInfo.SubRegion -> WesternEurope
18-
//countryInfo...
19-
20-
### Get CountryInfo - Germany via CommonName
21-
22-
ICountryProvider countryProvider = new CountryProvider();
23-
var countryInfo = countryProvider.GetCountryByName("Germany");
24-
//countryInfo.Alpha2Code -> DE
25-
//countryInfo.Alpha3Code -> DEU
26-
//countryInfo.NumericCode -> 276
27-
//countryInfo.Region -> Europe
28-
//countryInfo.SubRegion -> WesternEurope
29-
//countryInfo..
21+
### Get CountryInfo for Germany via ISO-3166-1 Alpha-2
22+
══════════════════════════════════════════════════════════════════════════════════════════════════════
23+
24+
```cs
25+
ICountryProvider countryProvider = new CountryProvider();
26+
var countryInfo = countryProvider.GetCountry("de");
27+
//countryInfo.CommonName -> Germany
28+
//countryInfo.Alpha3Code -> DEU
29+
//countryInfo.NumericCode -> 276
30+
//countryInfo.Region -> Europe
31+
//countryInfo.SubRegion -> WesternEurope
32+
//countryInfo...
33+
```
34+
35+
### Get CountryInfo for Germany via Alpha2Code
36+
37+
```cs
38+
ICountryProvider countryProvider = new CountryProvider();
39+
var countryInfo = countryProvider.GetCountry(Alpha2Code.DE);
40+
//countryInfo.CommonName -> Germany
41+
//countryInfo.Alpha3Code -> DEU
42+
//countryInfo.NumericCode -> 276
43+
//countryInfo.Region -> Europe
44+
//countryInfo.SubRegion -> WesternEurope
45+
//countryInfo...
46+
```
47+
48+
### Get CountryInfo for Germany via CommonName
49+
50+
```cs
51+
ICountryProvider countryProvider = new CountryProvider();
52+
var countryInfo = countryProvider.GetCountryByName("Germany");
53+
//countryInfo.Alpha2Code -> DE
54+
//countryInfo.Alpha3Code -> DEU
55+
//countryInfo.NumericCode -> 276
56+
//countryInfo.Region -> Europe
57+
//countryInfo.SubRegion -> WesternEurope
58+
//countryInfo..
59+
```
60+
61+
### Get all available countries
62+
63+
Retrieve a full list of all 250 countries and territories.
64+
65+
```cs
66+
var countryProvider = new CountryProvider();
67+
var countries = countryProvider.GetCountries();
68+
```

src/Nager.Country/Nager.Country.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<TargetFrameworks>net48;netstandard2.0;netstandard2.1;net6;net8;net9</TargetFrameworks>
2525

26-
<Version>4.3.1</Version>
26+
<Version>4.3.2</Version>
2727
</PropertyGroup>
2828

2929
<ItemGroup>

src/Nager.Country/readme.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ Project Source: https://github.com/nager/Nager.Country
2020

2121
Examples of use:
2222

23+
Get CountryInfo for Germany via ISO-3166-1 Alpha-2
24+
══════════════════════════════════════════════════════════════════════════════════════════════════════
25+
26+
ICountryProvider countryProvider = new CountryProvider();
27+
var countryInfo = countryProvider.GetCountry("de");
28+
//countryInfo.CommonName -> Germany
29+
//countryInfo.Alpha3Code -> DEU
30+
//countryInfo.NumericCode -> 276
31+
//countryInfo.Region -> Europe
32+
//countryInfo.SubRegion -> WesternEurope
33+
//countryInfo...
34+
2335
Get CountryInfo for Germany via Alpha2Code
2436
══════════════════════════════════════════════════════════════════════════════════════════════════════
2537

0 commit comments

Comments
 (0)