53 lines
1.3 KiB
PHP
53 lines
1.3 KiB
PHP
<?php
|
|
|
|
if (!function_exists('getFlagFilename')) {
|
|
function getFlagFilename($countryName)
|
|
{
|
|
// Define your mapping logic here
|
|
$countryFlagMap = [
|
|
'United States' => 'us.svg',
|
|
'India' => 'in.svg',
|
|
'Australia' => 'au.svg',
|
|
'United Kingdom' => 'uk.svg',
|
|
'Germany' => 'de.svg',
|
|
'France' => 'fr.svg',
|
|
'China' => 'cn.svg',
|
|
'Japan' => 'jp.svg',
|
|
'Brazil' => 'br.svg',
|
|
'South Korea' => 'kr.svg',
|
|
'Italy' => 'it.svg',
|
|
'Spain' => 'es.svg',
|
|
'Russia' => 'ru.svg',
|
|
'Mexico' => 'mx.svg',
|
|
'Argentina' => 'ar.svg',
|
|
'Netherlands' => 'nl.svg',
|
|
'Sweden' => 'se.svg',
|
|
'Turkey' => 'tr.svg',
|
|
'Singapore' => 'sg.svg',
|
|
'Greece' => 'gr.svg',
|
|
'Norway' => 'no.svg',
|
|
'Canada' => 'ca.svg',
|
|
'New Zealand' => 'nz.svg',
|
|
'Portugal' => 'pt.svg',
|
|
'Belgium' => 'be.svg',
|
|
'Europe' => 'europe.svg',
|
|
'Ireland' => 'ie.svg',
|
|
'Poland' => 'pl.svg',
|
|
'Denmark' => 'dk.svg',
|
|
'Czech Republic' => 'cz.svg',
|
|
'Hungary' => 'hu.svg',
|
|
'Finland' => 'fi.svg',
|
|
'Croatia' => 'hr.svg',
|
|
'Bulgaria' => 'bg.svg',
|
|
'Romania' => 'ro.svg',
|
|
'Ukraine' => 'ua.svg',
|
|
'Switzerland' => 'ch.svg',
|
|
'Austria' => 'at.svg',
|
|
// Add even more countries here
|
|
];
|
|
|
|
|
|
return isset($countryFlagMap[$countryName]) ? $countryFlagMap[$countryName] : null;
|
|
}
|
|
}
|