Skip to content

Commit c631e11

Browse files
authored
Update README.md
Added country flag documentation, work in progress..
1 parent d81032f commit c631e11

1 file changed

Lines changed: 268 additions & 11 deletions

File tree

README.md

Lines changed: 268 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ A simple cross platform offline .NET library for getting Global Country Data wit
1111

1212

1313
### Install Library
14+
##### Package Manager
1415
```cSharp
15-
PM> Install-Package CountryData.Standard -Version 1.0.1
16+
PM> Install-Package CountryData.Standard -Version 1.2.0
17+
```
18+
19+
##### .NET CLI
20+
```cSharp
21+
> dotnet add package CountryData.Standard --version 1.2.0
1622
```
1723

1824

@@ -27,22 +33,275 @@ A simple cross platform offline .NET library for getting Global Country Data wit
2733
### Get list of Countries
2834
```cSharp
2935
var countries = helper.GetCountries();
30-
foreach (var country in countries)
31-
{
32-
Console.WriteLine(country);
33-
}
36+
foreach (var country in countries)
37+
Console.WriteLine(country);
3438
```
3539

3640

3741
### Get list of Regions in a Country by Country Code
3842
```cSharp
3943
var regions = helper.GetRegionByCountryCode("GH");
4044
foreach (var region in regions)
41-
{
42-
Console.WriteLine(region.Name);
43-
}
45+
Console.WriteLine(region.Name);
4446
```
4547

48+
### Get Country Flag
49+
50+
#### List of supported ISO-3166-1 country codes, their codepoint pairs and Emoji Flags.
51+
52+
|ISO|Emoji|Unicode|Name|
53+
|--- |--- |--- |--- |
54+
|AD|🇦🇩|U+1F1E6 U+1F1E9|Andorra|
55+
|AE|🇦🇪|U+1F1E6 U+1F1EA|United Arab Emirates|
56+
|AF|🇦🇫|U+1F1E6 U+1F1EB|Afghanistan|
57+
|AG|🇦🇬|U+1F1E6 U+1F1EC|Antigua and Barbuda|
58+
|AI|🇦🇮|U+1F1E6 U+1F1EE|Anguilla|
59+
|AL|🇦🇱|U+1F1E6 U+1F1F1|Albania|
60+
|AM|🇦🇲|U+1F1E6 U+1F1F2|Armenia|
61+
|AO|🇦🇴|U+1F1E6 U+1F1F4|Angola|
62+
|AQ|🇦🇶|U+1F1E6 U+1F1F6|Antarctica|
63+
|AR|🇦🇷|U+1F1E6 U+1F1F7|Argentina|
64+
|AS|🇦🇸|U+1F1E6 U+1F1F8|American Samoa|
65+
|AT|🇦🇹|U+1F1E6 U+1F1F9|Austria|
66+
|AU|🇦🇺|U+1F1E6 U+1F1FA|Australia|
67+
|AW|🇦🇼|U+1F1E6 U+1F1FC|Aruba|
68+
|AX|🇦🇽|U+1F1E6 U+1F1FD|Åland Islands|
69+
|AZ|🇦🇿|U+1F1E6 U+1F1FF|Azerbaijan|
70+
|BA|🇧🇦|U+1F1E7 U+1F1E6|Bosnia and Herzegovina|
71+
|BB|🇧🇧|U+1F1E7 U+1F1E7|Barbados|
72+
|BD|🇧🇩|U+1F1E7 U+1F1E9|Bangladesh|
73+
|BE|🇧🇪|U+1F1E7 U+1F1EA|Belgium|
74+
|BF|🇧🇫|U+1F1E7 U+1F1EB|Burkina Faso|
75+
|BG|🇧🇬|U+1F1E7 U+1F1EC|Bulgaria|
76+
|BH|🇧🇭|U+1F1E7 U+1F1ED|Bahrain|
77+
|BI|🇧🇮|U+1F1E7 U+1F1EE|Burundi|
78+
|BJ|🇧🇯|U+1F1E7 U+1F1EF|Benin|
79+
|BL|🇧🇱|U+1F1E7 U+1F1F1|Saint Barthélemy|
80+
|BM|🇧🇲|U+1F1E7 U+1F1F2|Bermuda|
81+
|BN|🇧🇳|U+1F1E7 U+1F1F3|Brunei Darussalam|
82+
|BO|🇧🇴|U+1F1E7 U+1F1F4|Bolivia|
83+
|BQ|🇧🇶|U+1F1E7 U+1F1F6|Bonaire, Sint Eustatius and Saba|
84+
|BR|🇧🇷|U+1F1E7 U+1F1F7|Brazil|
85+
|BS|🇧🇸|U+1F1E7 U+1F1F8|Bahamas|
86+
|BT|🇧🇹|U+1F1E7 U+1F1F9|Bhutan|
87+
|BV|🇧🇻|U+1F1E7 U+1F1FB|Bouvet Island|
88+
|BW|🇧🇼|U+1F1E7 U+1F1FC|Botswana|
89+
|BY|🇧🇾|U+1F1E7 U+1F1FE|Belarus|
90+
|BZ|🇧🇿|U+1F1E7 U+1F1FF|Belize|
91+
|CA|🇨🇦|U+1F1E8 U+1F1E6|Canada|
92+
|CC|🇨🇨|U+1F1E8 U+1F1E8|Cocos (Keeling) Islands|
93+
|CD|🇨🇩|U+1F1E8 U+1F1E9|Congo|
94+
|CF|🇨🇫|U+1F1E8 U+1F1EB|Central African Republic|
95+
|CG|🇨🇬|U+1F1E8 U+1F1EC|Congo|
96+
|CH|🇨🇭|U+1F1E8 U+1F1ED|Switzerland|
97+
|CI|🇨🇮|U+1F1E8 U+1F1EE|Côte D'Ivoire|
98+
|CK|🇨🇰|U+1F1E8 U+1F1F0|Cook Islands|
99+
|CL|🇨🇱|U+1F1E8 U+1F1F1|Chile|
100+
|CM|🇨🇲|U+1F1E8 U+1F1F2|Cameroon|
101+
|CN|🇨🇳|U+1F1E8 U+1F1F3|China|
102+
|CO|🇨🇴|U+1F1E8 U+1F1F4|Colombia|
103+
|CR|🇨🇷|U+1F1E8 U+1F1F7|Costa Rica|
104+
|CU|🇨🇺|U+1F1E8 U+1F1FA|Cuba|
105+
|CV|🇨🇻|U+1F1E8 U+1F1FB|Cape Verde|
106+
|CW|🇨🇼|U+1F1E8 U+1F1FC|Curaçao|
107+
|CX|🇨🇽|U+1F1E8 U+1F1FD|Christmas Island|
108+
|CY|🇨🇾|U+1F1E8 U+1F1FE|Cyprus|
109+
|CZ|🇨🇿|U+1F1E8 U+1F1FF|Czech Republic|
110+
|DE|🇩🇪|U+1F1E9 U+1F1EA|Germany|
111+
|DJ|🇩🇯|U+1F1E9 U+1F1EF|Djibouti|
112+
|DK|🇩🇰|U+1F1E9 U+1F1F0|Denmark|
113+
|DM|🇩🇲|U+1F1E9 U+1F1F2|Dominica|
114+
|DO|🇩🇴|U+1F1E9 U+1F1F4|Dominican Republic|
115+
|DZ|🇩🇿|U+1F1E9 U+1F1FF|Algeria|
116+
|EC|🇪🇨|U+1F1EA U+1F1E8|Ecuador|
117+
|EE|🇪🇪|U+1F1EA U+1F1EA|Estonia|
118+
|EG|🇪🇬|U+1F1EA U+1F1EC|Egypt|
119+
|EH|🇪🇭|U+1F1EA U+1F1ED|Western Sahara|
120+
|ER|🇪🇷|U+1F1EA U+1F1F7|Eritrea|
121+
|ES|🇪🇸|U+1F1EA U+1F1F8|Spain|
122+
|ET|🇪🇹|U+1F1EA U+1F1F9|Ethiopia|
123+
|FI|🇫🇮|U+1F1EB U+1F1EE|Finland|
124+
|FJ|🇫🇯|U+1F1EB U+1F1EF|Fiji|
125+
|FK|🇫🇰|U+1F1EB U+1F1F0|Falkland Islands (Malvinas)|
126+
|FM|🇫🇲|U+1F1EB U+1F1F2|Micronesia|
127+
|FO|🇫🇴|U+1F1EB U+1F1F4|Faroe Islands|
128+
|FR|🇫🇷|U+1F1EB U+1F1F7|France|
129+
|GA|🇬🇦|U+1F1EC U+1F1E6|Gabon|
130+
|GB|🇬🇧|U+1F1EC U+1F1E7|United Kingdom|
131+
|GD|🇬🇩|U+1F1EC U+1F1E9|Grenada|
132+
|GE|🇬🇪|U+1F1EC U+1F1EA|Georgia|
133+
|GF|🇬🇫|U+1F1EC U+1F1EB|French Guiana|
134+
|GG|🇬🇬|U+1F1EC U+1F1EC|Guernsey|
135+
|GH|🇬🇭|U+1F1EC U+1F1ED|Ghana|
136+
|GI|🇬🇮|U+1F1EC U+1F1EE|Gibraltar|
137+
|GL|🇬🇱|U+1F1EC U+1F1F1|Greenland|
138+
|GM|🇬🇲|U+1F1EC U+1F1F2|Gambia|
139+
|GN|🇬🇳|U+1F1EC U+1F1F3|Guinea|
140+
|GP|🇬🇵|U+1F1EC U+1F1F5|Guadeloupe|
141+
|GQ|🇬🇶|U+1F1EC U+1F1F6|Equatorial Guinea|
142+
|GR|🇬🇷|U+1F1EC U+1F1F7|Greece|
143+
|GS|🇬🇸|U+1F1EC U+1F1F8|South Georgia|
144+
|GT|🇬🇹|U+1F1EC U+1F1F9|Guatemala|
145+
|GU|🇬🇺|U+1F1EC U+1F1FA|Guam|
146+
|GW|🇬🇼|U+1F1EC U+1F1FC|Guinea-Bissau|
147+
|GY|🇬🇾|U+1F1EC U+1F1FE|Guyana|
148+
|HK|🇭🇰|U+1F1ED U+1F1F0|Hong Kong|
149+
|HM|🇭🇲|U+1F1ED U+1F1F2|Heard Island and Mcdonald Islands|
150+
|HN|🇭🇳|U+1F1ED U+1F1F3|Honduras|
151+
|HR|🇭🇷|U+1F1ED U+1F1F7|Croatia|
152+
|HT|🇭🇹|U+1F1ED U+1F1F9|Haiti|
153+
|HU|🇭🇺|U+1F1ED U+1F1FA|Hungary|
154+
|ID|🇮🇩|U+1F1EE U+1F1E9|Indonesia|
155+
|IE|🇮🇪|U+1F1EE U+1F1EA|Ireland|
156+
|IL|🇮🇱|U+1F1EE U+1F1F1|Israel|
157+
|IM|🇮🇲|U+1F1EE U+1F1F2|Isle of Man|
158+
|IN|🇮🇳|U+1F1EE U+1F1F3|India|
159+
|IO|🇮🇴|U+1F1EE U+1F1F4|British Indian Ocean Territory|
160+
|IQ|🇮🇶|U+1F1EE U+1F1F6|Iraq|
161+
|IR|🇮🇷|U+1F1EE U+1F1F7|Iran|
162+
|IS|🇮🇸|U+1F1EE U+1F1F8|Iceland|
163+
|IT|🇮🇹|U+1F1EE U+1F1F9|Italy|
164+
|JE|🇯🇪|U+1F1EF U+1F1EA|Jersey|
165+
|JM|🇯🇲|U+1F1EF U+1F1F2|Jamaica|
166+
|JO|🇯🇴|U+1F1EF U+1F1F4|Jordan|
167+
|JP|🇯🇵|U+1F1EF U+1F1F5|Japan|
168+
|KE|🇰🇪|U+1F1F0 U+1F1EA|Kenya|
169+
|KG|🇰🇬|U+1F1F0 U+1F1EC|Kyrgyzstan|
170+
|KH|🇰🇭|U+1F1F0 U+1F1ED|Cambodia|
171+
|KI|🇰🇮|U+1F1F0 U+1F1EE|Kiribati|
172+
|KM|🇰🇲|U+1F1F0 U+1F1F2|Comoros|
173+
|KN|🇰🇳|U+1F1F0 U+1F1F3|Saint Kitts and Nevis|
174+
|KP|🇰🇵|U+1F1F0 U+1F1F5|North Korea|
175+
|KR|🇰🇷|U+1F1F0 U+1F1F7|South Korea|
176+
|KW|🇰🇼|U+1F1F0 U+1F1FC|Kuwait|
177+
|KY|🇰🇾|U+1F1F0 U+1F1FE|Cayman Islands|
178+
|KZ|🇰🇿|U+1F1F0 U+1F1FF|Kazakhstan|
179+
|LA|🇱🇦|U+1F1F1 U+1F1E6|Lao People's Democratic Republic|
180+
|LB|🇱🇧|U+1F1F1 U+1F1E7|Lebanon|
181+
|LC|🇱🇨|U+1F1F1 U+1F1E8|Saint Lucia|
182+
|LI|🇱🇮|U+1F1F1 U+1F1EE|Liechtenstein|
183+
|LK|🇱🇰|U+1F1F1 U+1F1F0|Sri Lanka|
184+
|LR|🇱🇷|U+1F1F1 U+1F1F7|Liberia|
185+
|LS|🇱🇸|U+1F1F1 U+1F1F8|Lesotho|
186+
|LT|🇱🇹|U+1F1F1 U+1F1F9|Lithuania|
187+
|LU|🇱🇺|U+1F1F1 U+1F1FA|Luxembourg|
188+
|LV|🇱🇻|U+1F1F1 U+1F1FB|Latvia|
189+
|LY|🇱🇾|U+1F1F1 U+1F1FE|Libya|
190+
|MA|🇲🇦|U+1F1F2 U+1F1E6|Morocco|
191+
|MC|🇲🇨|U+1F1F2 U+1F1E8|Monaco|
192+
|MD|🇲🇩|U+1F1F2 U+1F1E9|Moldova|
193+
|ME|🇲🇪|U+1F1F2 U+1F1EA|Montenegro|
194+
|MF|🇲🇫|U+1F1F2 U+1F1EB|Saint Martin (French Part)|
195+
|MG|🇲🇬|U+1F1F2 U+1F1EC|Madagascar|
196+
|MH|🇲🇭|U+1F1F2 U+1F1ED|Marshall Islands|
197+
|MK|🇲🇰|U+1F1F2 U+1F1F0|Macedonia|
198+
|ML|🇲🇱|U+1F1F2 U+1F1F1|Mali|
199+
|MM|🇲🇲|U+1F1F2 U+1F1F2|Myanmar|
200+
|MN|🇲🇳|U+1F1F2 U+1F1F3|Mongolia|
201+
|MO|🇲🇴|U+1F1F2 U+1F1F4|Macao|
202+
|MP|🇲🇵|U+1F1F2 U+1F1F5|Northern Mariana Islands|
203+
|MQ|🇲🇶|U+1F1F2 U+1F1F6|Martinique|
204+
|MR|🇲🇷|U+1F1F2 U+1F1F7|Mauritania|
205+
|MS|🇲🇸|U+1F1F2 U+1F1F8|Montserrat|
206+
|MT|🇲🇹|U+1F1F2 U+1F1F9|Malta|
207+
|MU|🇲🇺|U+1F1F2 U+1F1FA|Mauritius|
208+
|MV|🇲🇻|U+1F1F2 U+1F1FB|Maldives|
209+
|MW|🇲🇼|U+1F1F2 U+1F1FC|Malawi|
210+
|MX|🇲🇽|U+1F1F2 U+1F1FD|Mexico|
211+
|MY|🇲🇾|U+1F1F2 U+1F1FE|Malaysia|
212+
|MZ|🇲🇿|U+1F1F2 U+1F1FF|Mozambique|
213+
|NA|🇳🇦|U+1F1F3 U+1F1E6|Namibia|
214+
|NC|🇳🇨|U+1F1F3 U+1F1E8|New Caledonia|
215+
|NE|🇳🇪|U+1F1F3 U+1F1EA|Niger|
216+
|NF|🇳🇫|U+1F1F3 U+1F1EB|Norfolk Island|
217+
|NG|🇳🇬|U+1F1F3 U+1F1EC|Nigeria|
218+
|NI|🇳🇮|U+1F1F3 U+1F1EE|Nicaragua|
219+
|NL|🇳🇱|U+1F1F3 U+1F1F1|Netherlands|
220+
|NO|🇳🇴|U+1F1F3 U+1F1F4|Norway|
221+
|NP|🇳🇵|U+1F1F3 U+1F1F5|Nepal|
222+
|NR|🇳🇷|U+1F1F3 U+1F1F7|Nauru|
223+
|NU|🇳🇺|U+1F1F3 U+1F1FA|Niue|
224+
|NZ|🇳🇿|U+1F1F3 U+1F1FF|New Zealand|
225+
|OM|🇴🇲|U+1F1F4 U+1F1F2|Oman|
226+
|PA|🇵🇦|U+1F1F5 U+1F1E6|Panama|
227+
|PE|🇵🇪|U+1F1F5 U+1F1EA|Peru|
228+
|PF|🇵🇫|U+1F1F5 U+1F1EB|French Polynesia|
229+
|PG|🇵🇬|U+1F1F5 U+1F1EC|Papua New Guinea|
230+
|PH|🇵🇭|U+1F1F5 U+1F1ED|Philippines|
231+
|PK|🇵🇰|U+1F1F5 U+1F1F0|Pakistan|
232+
|PL|🇵🇱|U+1F1F5 U+1F1F1|Poland|
233+
|PM|🇵🇲|U+1F1F5 U+1F1F2|Saint Pierre and Miquelon|
234+
|PN|🇵🇳|U+1F1F5 U+1F1F3|Pitcairn|
235+
|PR|🇵🇷|U+1F1F5 U+1F1F7|Puerto Rico|
236+
|PS|🇵🇸|U+1F1F5 U+1F1F8|Palestinian Territory|
237+
|PT|🇵🇹|U+1F1F5 U+1F1F9|Portugal|
238+
|PW|🇵🇼|U+1F1F5 U+1F1FC|Palau|
239+
|PY|🇵🇾|U+1F1F5 U+1F1FE|Paraguay|
240+
|QA|🇶🇦|U+1F1F6 U+1F1E6|Qatar|
241+
|RE|🇷🇪|U+1F1F7 U+1F1EA|Réunion|
242+
|RO|🇷🇴|U+1F1F7 U+1F1F4|Romania|
243+
|RS|🇷🇸|U+1F1F7 U+1F1F8|Serbia|
244+
|RU|🇷🇺|U+1F1F7 U+1F1FA|Russia|
245+
|RW|🇷🇼|U+1F1F7 U+1F1FC|Rwanda|
246+
|SA|🇸🇦|U+1F1F8 U+1F1E6|Saudi Arabia|
247+
|SB|🇸🇧|U+1F1F8 U+1F1E7|Solomon Islands|
248+
|SC|🇸🇨|U+1F1F8 U+1F1E8|Seychelles|
249+
|SD|🇸🇩|U+1F1F8 U+1F1E9|Sudan|
250+
|SE|🇸🇪|U+1F1F8 U+1F1EA|Sweden|
251+
|SG|🇸🇬|U+1F1F8 U+1F1EC|Singapore|
252+
|SH|🇸🇭|U+1F1F8 U+1F1ED|Saint Helena, Ascension and Tristan Da Cunha|
253+
|SI|🇸🇮|U+1F1F8 U+1F1EE|Slovenia|
254+
|SJ|🇸🇯|U+1F1F8 U+1F1EF|Svalbard and Jan Mayen|
255+
|SK|🇸🇰|U+1F1F8 U+1F1F0|Slovakia|
256+
|SL|🇸🇱|U+1F1F8 U+1F1F1|Sierra Leone|
257+
|SM|🇸🇲|U+1F1F8 U+1F1F2|San Marino|
258+
|SN|🇸🇳|U+1F1F8 U+1F1F3|Senegal|
259+
|SO|🇸🇴|U+1F1F8 U+1F1F4|Somalia|
260+
|SR|🇸🇷|U+1F1F8 U+1F1F7|Suriname|
261+
|SS|🇸🇸|U+1F1F8 U+1F1F8|South Sudan|
262+
|ST|🇸🇹|U+1F1F8 U+1F1F9|Sao Tome and Principe|
263+
|SV|🇸🇻|U+1F1F8 U+1F1FB|El Salvador|
264+
|SX|🇸🇽|U+1F1F8 U+1F1FD|Sint Maarten (Dutch Part)|
265+
|SY|🇸🇾|U+1F1F8 U+1F1FE|Syrian Arab Republic|
266+
|SZ|🇸🇿|U+1F1F8 U+1F1FF|Swaziland|
267+
|TC|🇹🇨|U+1F1F9 U+1F1E8|Turks and Caicos Islands|
268+
|TD|🇹🇩|U+1F1F9 U+1F1E9|Chad|
269+
|TF|🇹🇫|U+1F1F9 U+1F1EB|French Southern Territories|
270+
|TG|🇹🇬|U+1F1F9 U+1F1EC|Togo|
271+
|TH|🇹🇭|U+1F1F9 U+1F1ED|Thailand|
272+
|TJ|🇹🇯|U+1F1F9 U+1F1EF|Tajikistan|
273+
|TK|🇹🇰|U+1F1F9 U+1F1F0|Tokelau|
274+
|TL|🇹🇱|U+1F1F9 U+1F1F1|Timor-Leste|
275+
|TM|🇹🇲|U+1F1F9 U+1F1F2|Turkmenistan|
276+
|TN|🇹🇳|U+1F1F9 U+1F1F3|Tunisia|
277+
|TO|🇹🇴|U+1F1F9 U+1F1F4|Tonga|
278+
|TR|🇹🇷|U+1F1F9 U+1F1F7|Turkey|
279+
|TT|🇹🇹|U+1F1F9 U+1F1F9|Trinidad and Tobago|
280+
|TV|🇹🇻|U+1F1F9 U+1F1FB|Tuvalu|
281+
|TW|🇹🇼|U+1F1F9 U+1F1FC|Taiwan|
282+
|TZ|🇹🇿|U+1F1F9 U+1F1FF|Tanzania|
283+
|UA|🇺🇦|U+1F1FA U+1F1E6|Ukraine|
284+
|UG|🇺🇬|U+1F1FA U+1F1EC|Uganda|
285+
|UM|🇺🇲|U+1F1FA U+1F1F2|United States Minor Outlying Islands|
286+
|US|🇺🇸|U+1F1FA U+1F1F8|United States|
287+
|UY|🇺🇾|U+1F1FA U+1F1FE|Uruguay|
288+
|UZ|🇺🇿|U+1F1FA U+1F1FF|Uzbekistan|
289+
|VA|🇻🇦|U+1F1FB U+1F1E6|Vatican City|
290+
|VC|🇻🇨|U+1F1FB U+1F1E8|Saint Vincent and The Grenadines|
291+
|VE|🇻🇪|U+1F1FB U+1F1EA|Venezuela|
292+
|VG|🇻🇬|U+1F1FB U+1F1EC|Virgin Islands, British|
293+
|VI|🇻🇮|U+1F1FB U+1F1EE|Virgin Islands, U.S.|
294+
|VN|🇻🇳|U+1F1FB U+1F1F3|Viet Nam|
295+
|VU|🇻🇺|U+1F1FB U+1F1FA|Vanuatu|
296+
|WF|🇼🇫|U+1F1FC U+1F1EB|Wallis and Futuna|
297+
|WS|🇼🇸|U+1F1FC U+1F1F8|Samoa|
298+
|YE|🇾🇪|U+1F1FE U+1F1EA|Yemen|
299+
|YT|🇾🇹|U+1F1FE U+1F1F9|Mayotte|
300+
|ZA|🇿🇦|U+1F1FF U+1F1E6|South Africa|
301+
|ZM|🇿🇲|U+1F1FF U+1F1F2|Zambia|
302+
|ZW|🇿🇼|U+1F1FF U+1F1FC|Zimbabwe|
303+
304+
46305

47306
### Using lambda for custom querries
48307
#### `GetCountryData()` returns an `IEnumerable<Country>` which can be querried with Lambda for a more flexible usage.
@@ -52,9 +311,7 @@ A simple cross platform offline .NET library for getting Global Country Data wit
52311
//get list of countries by their Names
53312
var countries = data.Select(c => c.CountryName).ToList();
54313
foreach (var country in countries)
55-
{
56-
Console.WriteLine(country);
57-
}
314+
Console.WriteLine(country);
58315

59316

60317
//example 2

0 commit comments

Comments
 (0)