// ISO 3166-1 alpha-2
pub fn locale_to_country_code(code: &str) -> &'static str {
    match code {
        "en-gb" => "GB",
        "en-ca" | "fr-ca" => "CA",
        "en-au" => "AU",
        "en-nz" => "NZ",
        "en-sg" => "SG",
        "en-za" => "ZA",
        "en-ng" => "NG",
        "de" => "DE",
        "de-at" => "AT",
        "fr" => "FR",
        "fr-be" | "nl-be" => "BE",
        "it" => "IT",
        "es" => "ES",
        "nl" => "NL",
        "pt" => "PT",
        "pt-br" => "BR",
        "ja" => "JP",
        "zh" => "CN",
        "hi" => "IN",
        "vi" => "VN",
        "tr" => "TR",
        "se" => "SE",
        "da" => "DK",
        "no" => "NO",
        "fi" => "FI",
        "pl" => "PL",
        "cs" => "CZ",
        "sk" => "SK",
        "hu" => "HU",
        "ro" => "RO",
        "hr" => "HR",
        "bg" => "BG",
        "sr" => "RS",
        "ru" => "RU",
        "uk" => "UA",
        "be" => "BY",
        "el" => "GR",
        "cy" => "CY",
        "ie" => "IE",
        "sl" => "SI",
        "et" => "EE",
        "lt" => "LT",
        "lv" => "LV",
        "ar" => "AR",
        "mx" => "MX",
        "cl" => "CL",
        "co" => "CO",
        "pe" => "PE",
        "uy" => "UY",
        "ve" => "VE",
        "ec" => "EC",
        "ko" => "KR",
        "id" => "ID",
        "th" => "TH",
        "ms" => "MY",
        "tl" => "PH",
        "tw" => "TW",
        "he" => "IL",
        "ar-sa" => "SA",
        "ar-ae" => "AE",
        "pk" => "PK",
        "bd" => "BD",
        "eg" => "EG",
        "mt" => "MT",
        "lb" => "LU",
        _ => "US",
    }
}

pub fn locale_to_country(code: &str) -> &'static str {
    match code {
        "en-gb" => "United Kingdom",
        "en-ca" | "fr-ca" => "Canada",
        "en-au" => "Australia",
        "en-nz" => "New Zealand",
        "en-sg" => "Singapore",
        "en-za" => "South Africa",
        "en-ng" => "Nigeria",
        "de" => "Germany",
        "de-at" => "Austria",
        "fr" => "France",
        "fr-be" | "nl-be" => "Belgium",
        "it" => "Italy",
        "es" => "Spain",
        "nl" => "Netherlands",
        "pt" => "Portugal",
        "pt-br" => "Brazil",
        "ja" => "Japan",
        "zh" => "China",
        "hi" => "India",
        "vi" => "Vietnam",
        "tr" => "Turkey",
        "se" => "Sweden",
        "da" => "Denmark",
        "no" => "Norway",
        "fi" => "Finland",
        "pl" => "Poland",
        "cs" => "Czech Republic",
        "sk" => "Slovakia",
        "hu" => "Hungary",
        "ro" => "Romania",
        "hr" => "Croatia",
        "bg" => "Bulgaria",
        "sr" => "Serbia",
        "ru" => "Russia",
        "uk" => "Ukraine",
        "be" => "Belarus",
        "el" | "cy" => "Greece",
        "sl" => "Slovenia",
        "et" => "Estonia",
        "lt" => "Lithuania",
        "lv" => "Latvia",
        "ie" => "Ireland",
        "ar" => "Argentina",
        "mx" => "Mexico",
        "cl" => "Chile",
        "co" => "Colombia",
        "pe" => "Peru",
        "uy" => "Uruguay",
        "ve" => "Venezuela",
        "ec" => "Ecuador",
        "ko" => "South Korea",
        "id" => "Indonesia",
        "th" => "Thailand",
        "ms" => "Malaysia",
        "tl" => "Philippines",
        "tw" => "Taiwan",
        "he" => "Israel",
        "ar-sa" => "Saudi Arabia",
        "ar-ae" => "United Arab Emirates",
        "pk" => "Pakistan",
        "bd" => "Bangladesh",
        "eg" => "Egypt",
        "mt" => "Malta",
        "lb" => "Luxembourg",
        _ => "United States",
    }
}
