2026-06-14 19:21:38 +02:00
|
|
|
export const TEAM_ISO: Record<string, string | null> = {
|
2026-06-14 15:36:44 +02:00
|
|
|
// A
|
|
|
|
|
'Afghanistan': 'af', 'Albania': 'al', 'Algeria': 'dz', 'Angola': 'ao',
|
|
|
|
|
'Argentina': 'ar', 'Armenia': 'am', 'Australia': 'au', 'Austria': 'at',
|
|
|
|
|
// B
|
|
|
|
|
'Bahrain': 'bh', 'Belgium': 'be', 'Bolivia': 'bo',
|
|
|
|
|
'Bosnia & Herzegovina': 'ba', 'Bosnia and Herzegovina': 'ba', 'Brazil': 'br',
|
|
|
|
|
'Bulgaria': 'bg', 'Burkina Faso': 'bf',
|
|
|
|
|
// C
|
|
|
|
|
'Cameroon': 'cm', 'Canada': 'ca', 'Cape Verde': 'cv', 'Chile': 'cl',
|
|
|
|
|
'China': 'cn', "China PR": 'cn', 'Colombia': 'co', 'Costa Rica': 'cr',
|
|
|
|
|
'Croatia': 'hr', 'Cuba': 'cu', 'Curaçao': 'cw', 'Curacao': 'cw',
|
|
|
|
|
'Cyprus': 'cy', 'Czech Republic': 'cz', 'Czechia': 'cz',
|
|
|
|
|
// D
|
|
|
|
|
'Denmark': 'dk', 'DR Congo': 'cd', 'Dutch East Indies': 'id',
|
|
|
|
|
// E
|
|
|
|
|
'Ecuador': 'ec', 'Egypt': 'eg', 'El Salvador': 'sv',
|
|
|
|
|
'England': 'gb-eng', 'Estonia': 'ee', 'Ethiopia': 'et',
|
|
|
|
|
// F
|
|
|
|
|
'Finland': 'fi', 'France': 'fr',
|
|
|
|
|
// G
|
2026-06-14 19:21:38 +02:00
|
|
|
'Gabon': 'ga', 'Germany': 'de', 'West Germany': 'de',
|
|
|
|
|
'East Germany': null, 'Germany DR': null,
|
2026-06-14 15:36:44 +02:00
|
|
|
'Ghana': 'gh', 'Greece': 'gr', 'Guatemala': 'gt', 'Guinea': 'gn',
|
|
|
|
|
// H
|
|
|
|
|
'Haiti': 'ht', 'Honduras': 'hn', 'Hungary': 'hu',
|
|
|
|
|
// I
|
|
|
|
|
'Iceland': 'is', 'India': 'in', 'Indonesia': 'id', 'Iran': 'ir',
|
|
|
|
|
'Iraq': 'iq', 'Ireland': 'ie', 'Republic of Ireland': 'ie',
|
|
|
|
|
'Israel': 'il', 'Italy': 'it', 'Ivory Coast': 'ci', "Côte d'Ivoire": 'ci',
|
|
|
|
|
// J
|
|
|
|
|
'Jamaica': 'jm', 'Japan': 'jp', 'Jordan': 'jo',
|
|
|
|
|
// K
|
|
|
|
|
'Kazakhstan': 'kz', 'Kenya': 'ke', 'Kuwait': 'kw',
|
|
|
|
|
// L
|
|
|
|
|
'Latvia': 'lv', 'Lebanon': 'lb', 'Liberia': 'lr', 'Lithuania': 'lt',
|
|
|
|
|
// M
|
|
|
|
|
'Mali': 'ml', 'Malta': 'mt', 'Mexico': 'mx', 'Moldova': 'md',
|
|
|
|
|
'Montenegro': 'me', 'Morocco': 'ma', 'Mozambique': 'mz',
|
|
|
|
|
// N
|
|
|
|
|
'Netherlands': 'nl', 'New Zealand': 'nz', 'Nigeria': 'ng',
|
|
|
|
|
'North Korea': 'kp', "Korea DPR": 'kp', 'Northern Ireland': 'gb-nir',
|
|
|
|
|
'North Macedonia': 'mk', 'Norway': 'no',
|
|
|
|
|
// O
|
|
|
|
|
'Oman': 'om',
|
|
|
|
|
// P
|
|
|
|
|
'Panama': 'pa', 'Paraguay': 'py', 'Peru': 'pe', 'Philippines': 'ph',
|
|
|
|
|
'Poland': 'pl', 'Portugal': 'pt',
|
|
|
|
|
// Q
|
|
|
|
|
'Qatar': 'qa',
|
|
|
|
|
// R
|
2026-06-14 19:21:38 +02:00
|
|
|
'Romania': 'ro', 'Russia': 'ru', 'Soviet Union': null,
|
2026-06-14 15:36:44 +02:00
|
|
|
// S
|
|
|
|
|
'Saudi Arabia': 'sa', 'Scotland': 'gb-sct', 'Senegal': 'sn',
|
2026-06-14 19:21:38 +02:00
|
|
|
'Serbia': 'rs', 'Yugoslavia': null, 'FR Yugoslavia': null, 'Czechoslovakia': null,
|
|
|
|
|
'Slovakia': 'sk', 'Slovenia': 'si',
|
2026-06-14 15:36:44 +02:00
|
|
|
'Somalia': 'so', 'South Africa': 'za', 'South Korea': 'kr',
|
|
|
|
|
'Korea Republic': 'kr', 'Spain': 'es', 'Sweden': 'se', 'Switzerland': 'ch',
|
|
|
|
|
// T
|
|
|
|
|
'Taiwan': 'tw', 'Tanzania': 'tz', 'Thailand': 'th', 'Togo': 'tg',
|
|
|
|
|
'Trinidad and Tobago': 'tt', 'Tunisia': 'tn', 'Turkey': 'tr',
|
|
|
|
|
// U
|
|
|
|
|
'UAE': 'ae', 'United Arab Emirates': 'ae', 'Uganda': 'ug', 'Ukraine': 'ua',
|
|
|
|
|
'Uruguay': 'uy', 'USA': 'us', 'United States': 'us', 'Uzbekistan': 'uz',
|
|
|
|
|
// V
|
|
|
|
|
'Venezuela': 've', 'Vietnam': 'vn',
|
|
|
|
|
// W
|
|
|
|
|
'Wales': 'gb-wls',
|
|
|
|
|
// Z
|
|
|
|
|
'Zambia': 'zm', 'Zimbabwe': 'zw',
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-14 19:21:38 +02:00
|
|
|
export function getIso(teamName: string): string | null {
|
|
|
|
|
if (teamName in TEAM_ISO) return TEAM_ISO[teamName]
|
|
|
|
|
return null
|
2026-06-14 15:36:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function slugify(name: string): string {
|
|
|
|
|
return name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')
|
|
|
|
|
}
|