var countriesInPortugueseBR = [
{
flag: 'af',
nameEn: 'Afghanistan',
namePt: 'Afeganistão',
},
{
flag: 'za',
nameEn: 'South Africa',
namePt: 'África do Sul',
},
{
flag: 'al',
nameEn: 'Albania',
namePt: 'Albânia',
},
{
flag: 'de',
nameEn: 'Germany',
namePt: 'Alemanha',
},
{
flag: 'ad',
nameEn: 'Andorra',
namePt: 'Andorra',
},
{
flag: 'ao',
nameEn: 'Angola',
namePt: 'Angola',
},
{
flag: 'ai',
nameEn: 'Anguilla',
namePt: 'Anguilla',
},
{
flag: 'ag',
nameEn: 'Antigua and Barbuda',
namePt: 'Antígua e Barbuda',
},
{
flag: 'sa',
nameEn: 'Saudi Arabia',
namePt: 'Arábia Saudita',
},
{
flag: 'dz',
nameEn: 'Algeria',
namePt: 'Argélia',
},
{
flag: 'ar',
nameEn: 'Argentina',
namePt: 'Argentina',
},
{
flag: 'am',
nameEn: 'Armenia',
namePt: 'Armênia',
},
{
flag: 'aw',
nameEn: 'Aruba',
namePt: 'Aruba',
},
{
flag: 'au',
nameEn: 'Australia',
namePt: 'Austrália',
},
{
flag: 'at',
nameEn: 'Austria',
namePt: 'Áustria',
},
{
flag: 'az',
nameEn: 'Azerbaijan',
namePt: 'Azerbaijão',
},
{
flag: 'bs',
nameEn: 'Bahamas',
namePt: 'Bahamas',
},
{
flag: 'bh',
nameEn: 'Bahrain',
namePt: 'Bahrein',
},
{
flag: 'bd',
nameEn: 'Bangladesh',
namePt: 'Bangladesh',
},
{
flag: 'bb',
nameEn: 'Barbados',
namePt: 'Barbados',
},
{
flag: 'be',
nameEn: 'Belgium',
namePt: 'Bélgica',
},
{
flag: 'bz',
nameEn: 'Belize',
namePt: 'Belize',
},
{
flag: 'bj',
nameEn: 'Benin',
namePt: 'Benim',
},
{
flag: 'bm',
nameEn: 'Bermuda',
namePt: 'Bermudas',
},
{
flag: 'by',
nameEn: 'Belarus',
namePt: 'Bielorrússia',
},
{
flag: 'bo',
nameEn: 'Bolivia (Plurinational State of)',
namePt: 'Bolívia',
},
{
flag: 'ba',
nameEn: 'Bosnia and Herzegovina',
namePt: 'Bósnia e Herzegovina',
},
{
flag: 'bw',
nameEn: 'Botswana',
namePt: 'Botswana',
},
{
flag: 'br',
nameEn: 'Brazil',
namePt: 'Brasil',
},
{
flag: 'bn',
nameEn: 'Brunei Darussalam',
namePt: 'Brunei',
},
{
flag: 'bg',
nameEn: 'Bulgaria',
namePt: 'Bulgária',
},
{
flag: 'bf',
nameEn: 'Burkina Faso',
namePt: 'Burkina Faso',
},
{
flag: 'bi',
nameEn: 'Burundi',
namePt: 'Burundi',
},
{
flag: 'bt',
nameEn: 'Bhutan',
namePt: 'Butão',
},
{
flag: 'cv',
nameEn: 'Cabo Verde',
namePt: 'Cabo Verde',
},
{
flag: 'cm',
nameEn: 'Cameroon',
namePt: 'Camarões',
},
{
flag: 'kh',
nameEn: 'Cambodia',
namePt: 'Camboja',
},
{
flag: 'ca',
nameEn: 'Canada',
namePt: 'Canadá',
},
{
flag: 'kz',
nameEn: 'Kazakhstan',
namePt: 'Cazaquistão',
},
{
flag: 'td',
nameEn: 'Chad',
namePt: 'Chade',
},
{
flag: 'cl',
nameEn: 'Chile',
namePt: 'Chile',
},
{
flag: 'cn',
nameEn: 'China',
namePt: 'China',
},
{
flag: 'cy',
nameEn: 'Cyprus',
namePt: 'Chipre',
},
{
flag: 'co',
nameEn: 'Colombia',
namePt: 'Colômbia',
},
{
flag: 'km',
nameEn: 'Comoros',
namePt: 'Comores',
},
{
flag: 'cg',
nameEn: 'Congo',
namePt: 'República do Congo',
},
{
flag: 'kp',
nameEn: 'Korea (Democratic People\'s Republic of)',
namePt: 'Coreia do Norte',
},
{
flag: 'kr',
nameEn: 'Korea (Republic of)',
namePt: 'Coreia do Sul',
},
{
flag: 'ci',
nameEn: 'Côte d\'Ivoire',
namePt: 'Costa do Marfim',
},
{
flag: 'cr',
nameEn: 'Costa Rica',
namePt: 'Costa Rica',
},
{
flag: 'hr',
nameEn: 'Croatia',
namePt: 'Croácia',
},
{
flag: 'cu',
nameEn: 'Cuba',
namePt: 'Cuba',
},
{
flag: 'dk',
nameEn: 'Denmark',
namePt: 'Dinamarca',
},
{
flag: 'dj',
nameEn: 'Djibouti',
namePt: 'Djibouti',
},
{
flag: 'dm',
nameEn: 'Dominica',
namePt: 'Dominica',
},
{
flag: 'eg',
nameEn: 'Egypt',
namePt: 'Egito',
},
{
flag: 'sv',
nameEn: 'El Salvador',
namePt: 'El Salvador',
},
{
flag: 'ae',
nameEn: 'United Arab Emirates',
namePt: 'Emirados Árabes',
},
{
flag: 'ec',
nameEn: 'Ecuador',
namePt: 'Equador',
},
{
flag: 'er',
nameEn: 'Eritrea',
namePt: 'Eritreia',
},
{
flag: 'sk',
nameEn: 'Slovakia',
namePt: 'Eslováquia',
},
{
flag: 'si',
nameEn: 'Slovenia',
namePt: 'Eslovênia',
},
{
flag: 'es',
nameEn: 'Spain',
namePt: 'Espanha',
},
{
flag: 'fm',
nameEn: 'Micronesia (Federated States of)',
namePt: 'Estados Federados da Micronésia',
},
{
flag: 'us',
nameEn: 'United States of America',
namePt: 'Estados Unidos',
},
{
flag: 'ee',
nameEn: 'Estonia',
namePt: 'Estónia',
},
{
flag: 'et',
nameEn: 'Ethiopia',
namePt: 'Etiópia',
},
{
flag: 'fj',
nameEn: 'Fiji',
namePt: 'Fiji',
},
{
flag: 'ph',
nameEn: 'Philippines',
namePt: 'Filipinas',
},
{
flag: 'fi',
nameEn: 'Finland',
namePt: 'Finlândia',
},
{
flag: 'fr',
nameEn: 'France',
namePt: 'França',
},
{
flag: 'ga',
nameEn: 'Gabon',
namePt: 'Gabão',
},
{
flag: 'gm',
nameEn: 'Gambia',
namePt: 'Gâmbia',
},
{
flag: 'gh',
nameEn: 'Ghana',
namePt: 'Gana',
},
{
flag: 'ge',
nameEn: 'Georgia',
namePt: 'Geórgia',
},
{
flag: 'gd',
nameEn: 'Grenada',
namePt: 'Granada',
},
{
flag: 'gr',
nameEn: 'Greece',
namePt: 'Grécia',
},
{
flag: 'gp',
nameEn: 'Guadeloupe',
namePt: 'Guadalupe',
},
{
flag: 'gu',
nameEn: 'Guam',
namePt: 'Guam',
},
{
flag: 'gt',
nameEn: 'Guatemala',
namePt: 'Guatemala',
},
{
flag: 'gy',
nameEn: 'Guyana',
namePt: 'Guiana',
},
{
flag: 'gf',
nameEn: 'French Guiana',
namePt: 'Guiana Francesa',
},
{
flag: 'gn',
nameEn: 'Guinea',
namePt: 'Guiné',
},
{
flag: 'gq',
nameEn: 'Equatorial Guinea',
namePt: 'Guiné Equatorial',
},
{
flag: 'gw',
nameEn: 'Guinea-Bissau',
namePt: 'Guiné-Bissau',
},
{
flag: 'ht',
nameEn: 'Haiti',
namePt: 'Haiti',
},
{
flag: 'hn',
nameEn: 'Honduras',
namePt: 'Honduras',
},
{
flag: 'hk',
nameEn: 'Hong Kong',
namePt: 'Hong Kong',
},
{
flag: 'hu',
nameEn: 'Hungary',
namePt: 'Hungria',
},
{
flag: 'ye',
nameEn: 'Yemen',
namePt: 'Iêmen',
},
{
flag: 'ky',
nameEn: 'Cayman Islands',
namePt: 'Ilhas Cayman',
},
{
flag: 'ck',
nameEn: 'Cook Islands',
namePt: 'Ilhas Cook',
},
{
flag: 'fo',
nameEn: 'Faroe Islands',
namePt: 'Ilhas Feroé',
},
{
flag: 'sb',
nameEn: 'Solomon Islands',
namePt: 'Ilhas Salomão',
},
{
flag: 'vi',
nameEn: 'Virgin Islands (U.S.)',
namePt: 'Ilhas Virgens Americanas',
},
{
flag: 'vg',
nameEn: 'Virgin Islands (British)',
namePt: 'Ilhas Virgens Britânicas',
},
{
flag: 'in',
nameEn: 'India',
namePt: 'Índia',
},
{
flag: 'id',
nameEn: 'Indonesia',
namePt: 'Indonésia',
},
{
flag: 'gb',
nameEn: 'United Kingdom of Great Britain and Northern Ireland',
namePt: 'Reino unido',
},
{
flag: 'ir',
nameEn: 'Iran (Islamic Republic of)',
namePt: 'Irão',
},
{
flag: 'iq',
nameEn: 'Iraq',
namePt: 'Iraque',
},
{
flag: 'ie',
nameEn: 'Ireland',
namePt: 'Irlanda',
},
{
flag: 'is',
nameEn: 'Iceland',
namePt: 'Islândia',
},
{
flag: 'il',
nameEn: 'Israel',
namePt: 'Israel',
},
{
flag: 'it',
nameEn: 'Italy',
namePt: 'Itália',
},
{
flag: 'jm',
nameEn: 'Jamaica',
namePt: 'Jamaica',
},
{
flag: 'jp',
nameEn: 'Japan',
namePt: 'Japão',
},
{
flag: 'jo',
nameEn: 'Jordan',
namePt: 'Jordânia',
},
{
flag: 'ki',
nameEn: 'Kiribati',
namePt: 'Kiribati',
},
{
flag: 'xk',
nameEn: 'Republic of Kosovo',
namePt: 'Kosovo',
},
{
flag: 'kw',
nameEn: 'Kuwait',
namePt: 'Kuwait',
},
{
flag: 'la',
nameEn: 'Lao People\'s Democratic Republic',
namePt: 'Laos',
},
{
flag: 'ls',
nameEn: 'Lesotho',
namePt: 'Lesoto',
},
{
flag: 'lv',
nameEn: 'Latvia',
namePt: 'Letônia',
},
{
flag: 'lb',
nameEn: 'Lebanon',
namePt: 'Líbano',
},
{
flag: 'lr',
nameEn: 'Liberia',
namePt: 'Libéria',
},
{
flag: 'ly',
nameEn: 'Libya',
namePt: 'Líbia',
},
{
flag: 'li',
nameEn: 'Liechtenstein',
namePt: 'Liechtenstein',
},
{
flag: 'lt',
nameEn: 'Lithuania',
namePt: 'Lituânia',
},
{
flag: 'lu',
nameEn: 'Luxembourg',
namePt: 'Luxemburgo',
},
{
flag: 'mo',
nameEn: 'Macao',
namePt: 'Macau',
},
{
flag: 'mk',
nameEn: 'Macedonia (the former Yugoslav Republic of)',
namePt: 'Macedônia do Norte',
},
{
flag: 'mg',
nameEn: 'Madagascar',
namePt: 'Madagáscar',
},
{
flag: 'my',
nameEn: 'Malaysia',
namePt: 'Malásia',
},
{
flag: 'mw',
nameEn: 'Malawi',
namePt: 'Malawi',
},
{
flag: 'mv',
nameEn: 'Maldives',
namePt: 'Maldivas',
},
{
flag: 'ml',
nameEn: 'Mali',
namePt: 'Mali',
},
{
flag: 'mt',
nameEn: 'Malta',
namePt: 'Malta',
},
{
flag: 'ma',
nameEn: 'Morocco',
namePt: 'Marrocos',
},
{
flag: 'mq',
nameEn: 'Martinique',
namePt: 'Martinica',
},
{
flag: 'mu',
nameEn: 'Mauritius',
namePt: 'Maurícia',
},
{
flag: 'mr',
nameEn: 'Mauritania',
namePt: 'Mauritânia',
},
{
flag: 'mx',
nameEn: 'Mexico',
namePt: 'México',
},
{
flag: 'mm',
nameEn: 'Myanmar',
namePt: 'Mianmar',
},
{
flag: 'mz',
nameEn: 'Mozambique',
namePt: 'Moçambique',
},
{
flag: 'md',
nameEn: 'Moldova (Republic of)',
namePt: 'Moldávia',
},
{
flag: 'mc',
nameEn: 'Monaco',
namePt: 'Mónaco',
},
{
flag: 'mn',
nameEn: 'Mongolia',
namePt: 'Mongólia',
},
{
flag: 'me',
nameEn: 'Montenegro',
namePt: 'Montenegro',
},
{
flag: 'ms',
nameEn: 'Montserrat',
namePt: 'Montserrat',
},
{
flag: 'na',
nameEn: 'Namibia',
namePt: 'Namíbia',
},
{
flag: 'nr',
nameEn: 'Nauru',
namePt: 'Nauru',
},
{
flag: 'np',
nameEn: 'Nepal',
namePt: 'Nepal',
},
{
flag: 'ni',
nameEn: 'Nicaragua',
namePt: 'Nicarágua',
},
{
flag: 'ne',
nameEn: 'Niger',
namePt: 'Níger',
},
{
flag: 'ng',
nameEn: 'Nigeria',
namePt: 'Nigéria',
},
{
flag: 'no',
nameEn: 'Norway',
namePt: 'Noruega',
},
{
flag: 'nc',
nameEn: 'New Caledonia',
namePt: 'Nova Caledônia',
},
{
flag: 'nz',
nameEn: 'New Zealand',
namePt: 'Nova Zelândia',
},
{
flag: 'om',
nameEn: 'Oman',
namePt: 'Omã',
},
{
flag: 'nl',
nameEn: 'Netherlands',
namePt: 'Países Baixos',
},
{
flag: 'pw',
nameEn: 'Palau',
namePt: 'Palau',
},
{
flag: 'ps',
nameEn: 'Palestine, State of',
namePt: 'Palestina',
},
{
flag: 'pa',
nameEn: 'Panama',
namePt: 'Panamá',
},
{
flag: 'pg',
nameEn: 'Papua New Guinea',
namePt: 'Papua-Nova Guiné',
},
{
flag: 'pk',
nameEn: 'Pakistan',
namePt: 'Paquistão',
},
{
flag: 'py',
nameEn: 'Paraguay',
namePt: 'Paraguai',
},
{
flag: 'pe',
nameEn: 'Peru',
namePt: 'Peru',
},
{
flag: 'pf',
nameEn: 'French Polynesia',
namePt: 'Polinésia Francesa',
},
{
flag: 'pl',
nameEn: 'Poland',
namePt: 'Polónia',
},
{
flag: 'pr',
nameEn: 'Puerto Rico',
namePt: 'Porto Rico',
},
{
flag: 'pt',
nameEn: 'Portugal',
namePt: 'Portugal',
},
{
flag: 'qa',
nameEn: 'Qatar',
namePt: 'Catar',
},
{
flag: 'ke',
nameEn: 'Kenya',
namePt: 'Quênia',
},
{
flag: 'kg',
nameEn: 'Kyrgyzstan',
namePt: 'Quirguistão',
},
{
flag: 'cf',
nameEn: 'Central African Republic',
namePt: 'República Centro-Africana',
},
{
flag: 'cz',
nameEn: 'Czech Republic',
namePt: 'República Checa',
},
{
flag: 'tw',
nameEn: 'Taiwan',
namePt: 'Taiwan',
},
{
flag: 'cd',
nameEn: 'Congo (Democratic Republic of the)',
namePt: 'República Democrática do Congo',
},
{
flag: 'do',
nameEn: 'Dominican Republic',
namePt: 'República Dominicana',
},
{
flag: 'ro',
nameEn: 'Romania',
namePt: 'Roménia',
},
{
flag: 'rw',
nameEn: 'Rwanda',
namePt: 'Ruanda',
},
{
flag: 'ru',
nameEn: 'Russian Federation',
namePt: 'Rússia',
},
{
flag: 'mf',
nameEn: 'Saint Martin (French part)',
namePt: 'São Martinho',
},
{
flag: 'ws',
nameEn: 'Samoa',
namePt: 'Samoa',
},
{
flag: 'as',
nameEn: 'American Samoa',
namePt: 'Samoa Americana',
},
{
flag: 'lc',
nameEn: 'Saint Lucia',
namePt: 'Santa Lúcia',
},
{
flag: 'kn',
nameEn: 'Saint Kitts and Nevis',
namePt: 'São Cristóvão e Névis',
},
{
flag: 'sm',
nameEn: 'San Marino',
namePt: 'San Marino',
},
{
flag: 'st',
nameEn: 'Sao Tome and Principe',
namePt: 'São Tomé e Príncipe',
},
{
flag: 'vc',
nameEn: 'Saint Vincent and the Grenadines',
namePt: 'São Vicente e Granadinas',
},
{
flag: 'sn',
nameEn: 'Senegal',
namePt: 'Senegal',
},
{
flag: 'sl',
nameEn: 'Sierra Leone',
namePt: 'Serra Leoa',
},
{
flag: 'rs',
nameEn: 'Serbia',
namePt: 'Sérvia',
},
{
flag: 'sc',
nameEn: 'Seychelles',
namePt: 'Seicheles',
},
{
flag: 'sg',
nameEn: 'Singapore',
namePt: 'Singapura',
},
{
flag: 'sx',
nameEn: 'Sint Maarten (Dutch part)',
namePt: 'São Martinho',
},
{
flag: 'sy',
nameEn: 'Syrian Arab Republic',
namePt: 'Síria',
},
{
flag: 'so',
nameEn: 'Somalia',
namePt: 'Somália',
},
{
flag: 'lk',
nameEn: 'Sri Lanka',
namePt: 'Sri Lanka',
},
{
flag: 'sz',
nameEn: 'Swaziland',
namePt: 'Suazilândia',
},
{
flag: 'sd',
nameEn: 'Sudan',
namePt: 'Sudão',
},
{
flag: 'ss',
nameEn: 'South Sudan',
namePt: 'Sudão do Sul',
},
{
flag: 'se',
nameEn: 'Sweden',
namePt: 'Suécia',
},
{
flag: 'ch',
nameEn: 'Switzerland',
namePt: 'Suíça',
},
{
flag: 'sr',
nameEn: 'Suriname',
namePt: 'Suriname',
},
{
flag: 'tj',
nameEn: 'Tajikistan',
namePt: 'Tajiquistão',
},
{
flag: 'th',
nameEn: 'Thailand',
namePt: 'Tailândia',
},
{
flag: 'tz',
nameEn: 'Tanzania, United Republic of',
namePt: 'Tanzânia',
},
{
flag: 'tl',
nameEn: 'Timor-Leste',
namePt: 'Timor-Leste',
},
{
flag: 'tg',
nameEn: 'Togo',
namePt: 'Togo',
},
{
flag: 'to',
nameEn: 'Tonga',
namePt: 'Tonga',
},
{
flag: 'tt',
nameEn: 'Trinidad and Tobago',
namePt: 'Trinidad e Tobago',
},
{
flag: 'tn',
nameEn: 'Tunisia',
namePt: 'Tunísia',
},
{
flag: 'tc',
nameEn: 'Turks and Caicos Islands',
namePt: 'Turks e Caicos',
},
{
flag: 'tm',
nameEn: 'Turkmenistan',
namePt: 'Turquemenistão',
},
{
flag: 'tr',
nameEn: 'Turkey',
namePt: 'Turquia',
},
{
flag: 'tv',
nameEn: 'Tuvalu',
namePt: 'Tuvalu',
},
{
flag: 'ua',
nameEn: 'Ukraine',
namePt: 'Ucrânia',
},
{
flag: 'ug',
nameEn: 'Uganda',
namePt: 'Uganda',
},
{
flag: 'uy',
nameEn: 'Uruguay',
namePt: 'Uruguai',
},
{
flag: 'uz',
nameEn: 'Uzbekistan',
namePt: 'Uzbequistão',
},
{
flag: 'vu',
nameEn: 'Vanuatu',
namePt: 'Vanuatu',
},
{
flag: 'va',
nameEn: 'Holy See',
namePt: 'Vaticano',
},
{
flag: 've',
nameEn: 'Venezuela (Bolivarian Republic of)',
namePt: 'Venezuela',
},
{
flag: 'vn',
nameEn: 'Viet Nam',
namePt: 'Vietnã',
},
{
flag: 'zm',
nameEn: 'Zambia',
namePt: 'Zâmbia',
},
{
flag: 'zw',
nameEn: 'Zimbabwe',
namePt: 'Zimbabwe',
},
];
const getFlag = flagCode =>
`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.3.0/flags/4x3/${flagCode}.svg`;
const flagItems = countriesInPortugueseBR.map(
({ namePt, nameEn, flag }) =>
`\n - <img src="${getFlag(flag)}" height="30" width="40" /> - **${namePt}** (_\`${nameEn}\`_)`,
);
const allCountriesWithFlagsMarkDown = `## All countries names and flags (in portuguese BR) (Todos os nomes e bandeiras dos países)\n${flagItems}`;
console.log(allCountriesWithFlagsMarkDown);