- Tore
+ {dict.label.goals}
{m.goals.map((g, i) => (
@@ -251,7 +252,7 @@ export default function KoFixtures({ teams, matches }: { teams: Team[]; matches:
cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center",
fontSize: 22, lineHeight: 1,
}}
- title="Nach oben scrollen"
+ title={dict.label.scrollToTop}
>
↑
@@ -260,7 +261,7 @@ export default function KoFixtures({ teams, matches }: { teams: Team[]; matches:
);
}
-function TeamLabel({ team, reverse }: { team?: Team; reverse?: boolean }) {
+function TeamLabel({ team, reverse, locale }: { team?: Team; reverse?: boolean; locale: string }) {
return (
- {team?.localisedName ?? team?.name ?? "—"}
+ {teamName(team, locale)}
);
diff --git a/app/[locale]/components/Simulation.tsx b/app/[locale]/components/Simulation.tsx
index 16f98ec..591cfca 100644
--- a/app/[locale]/components/Simulation.tsx
+++ b/app/[locale]/components/Simulation.tsx
@@ -2,13 +2,14 @@
import { useMemo } from "react";
import { Match, Team } from "@/lib/types";
+import { Dictionary } from "@/lib/i18n";
import { computeGroupTables, computeThirdPlaceTable } from "@/lib/standings";
import { qualifiedThirdGroups, resolveAnnexC, LATER_ROUNDS } from "@/lib/bracket";
import { resolveBracket, ResolvedTie } from "@/lib/resolve-bracket";
import { buildSimMatches } from "@/lib/simulation";
import Bracket from "./Bracket";
-export default function Simulation({ teams, matches }: { teams: Team[]; matches: Match[] }) {
+export default function Simulation({ teams, matches, dict, locale }: { teams: Team[]; matches: Match[]; dict: Dictionary; locale: string }) {
// ---- Simulations-Pipeline (Polymarket-Defaults, keine manuellen Overrides) ----
const simMatches = useMemo(() => buildSimMatches(matches, {}), [matches]);
const simTables = useMemo(() => computeGroupTables(teams, simMatches), [teams, simMatches]);
@@ -21,8 +22,8 @@ export default function Simulation({ teams, matches }: { teams: Team[]; matches:
const simAnnexResolved = simAnnex != null;
const simBracket = useMemo(
- () => resolveBracket(simMatches, teams, simTables, simThirds, simAnnex, simAnnexResolved, true),
- [simMatches, teams, simTables, simThirds, simAnnex, simAnnexResolved],
+ () => resolveBracket(simMatches, teams, simTables, simThirds, simAnnex, simAnnexResolved, true, dict),
+ [simMatches, teams, simTables, simThirds, simAnnex, simAnnexResolved, dict],
);
// Echte Tabellen/Bracket für fix/provisional-Flags (nur tatsächlich FINISHED).
@@ -34,8 +35,8 @@ export default function Simulation({ teams, matches }: { teams: Team[]; matches:
[realQGroups],
);
const realBracket = useMemo(
- () => resolveBracket(matches, teams, realTables, realThirds, realAnnex, realAnnex != null),
- [matches, teams, realTables, realThirds, realAnnex],
+ () => resolveBracket(matches, teams, realTables, realThirds, realAnnex, realAnnex != null, undefined, dict),
+ [matches, teams, realTables, realThirds, realAnnex, dict],
);
// R32: provisional-Flags aus dem echten Bracket übernehmen.
@@ -95,12 +96,11 @@ export default function Simulation({ teams, matches }: { teams: Team[]; matches:
return (
- Simulation — alle ungespielten Spiele sind mit dem Polymarket-Favoriten
- vorbelegt. Die angezeigten Wahrscheinlichkeiten stammen von Polymarket.
+ {dict.sim.notice}
- Simulierter K.o.-Baum
+ {dict.sim.heading}
);
diff --git a/app/[locale]/components/ThirdPlace.tsx b/app/[locale]/components/ThirdPlace.tsx
index fcfce3a..ea3ccfa 100644
--- a/app/[locale]/components/ThirdPlace.tsx
+++ b/app/[locale]/components/ThirdPlace.tsx
@@ -1,29 +1,27 @@
"use client";
-import { Team, ThirdPlaceRow } from "@/lib/types";
+import { Team, ThirdPlaceRow, teamName } from "@/lib/types";
+import { Dictionary } from "@/lib/i18n";
export default function ThirdPlace({
- rows, teams, secureTeams,
-}: { rows: ThirdPlaceRow[]; teams: Team[]; secureTeams?: string[] }) {
+ rows, teams, secureTeams, dict,
+}: { rows: ThirdPlaceRow[]; teams: Team[]; secureTeams?: string[]; dict: Dictionary }) {
const name = (id: string) => {
const t = teams.find((t) => t.id === id);
- return t?.localisedName ?? t?.name ?? id;
+ return teamName(t, "de");
};
const secureSet = secureTeams ? new Set(secureTeams) : null;
return (
- Acht der zwölf Gruppendritten erreichen die Runde der letzten 32. Gewertet wird
- gruppenübergreifend nach Punkten, Tordifferenz und Toren — der Direktvergleich
- entfällt, weil diese Teams nie gegeneinander gespielt haben. Die Trennlinie markiert
- den Schnitt zwischen Platz 8 und 9.
+ {dict.thirds.explanation}
- # Gruppe Team
- Sp Pkt ± Tore Status
+ {dict.table.rank} {dict.table.group} Team
+ {dict.table.matches} {dict.table.points} {dict.table.goalDiff} {dict.table.goals} {dict.table.status}
@@ -39,7 +37,7 @@ export default function ThirdPlace({
{name(r.teamId)}
{secureSet?.has(r.teamId) && (
- ✓
+ ✓
)}
{r.played}
@@ -48,7 +46,7 @@ export default function ThirdPlace({
{r.goalsFor}:{r.goalsAgainst}
- {r.qualifies ? "weiter" : "raus"}
+ {r.qualifies ? dict.thirds.advances : dict.thirds.eliminated}
diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx
index c300b3d..69f01a5 100644
--- a/app/[locale]/page.tsx
+++ b/app/[locale]/page.tsx
@@ -1,8 +1,9 @@
"use client";
-import { useEffect, useState, useCallback } from "react";
+import { useEffect, useState, useCallback, useMemo, use } from "react";
import { GroupId, GroupTable, Match, Team, ThirdPlaceRow } from "@/lib/types";
import { ThirdAssignment } from "@/lib/bracket";
+import { getDictionary, Locale, Dictionary } from "@/lib/i18n";
import Groups from "./components/Groups";
import ThirdPlace from "./components/ThirdPlace";
import Bracket from "./components/Bracket";
@@ -24,7 +25,9 @@ interface ApiData {
type Tab = "groups" | "groupfixtures" | "kofixtures" | "thirds" | "bracket" | "sim";
-export default function Home() {
+export default function Home({ params }: { params: Promise<{ locale: string }> }) {
+ const { locale } = use(params) as { locale: Locale };
+ const dict = useMemo(() => getDictionary(locale), [locale]);
const [data, setData] = useState(null);
const [error, setError] = useState(null);
const [tab, setTab] = useState("kofixtures");
@@ -33,7 +36,7 @@ export default function Home() {
const load = useCallback(async () => {
try {
- const res = await fetch("/api/matches", { cache: "no-store" });
+ const res = await fetch(`/api/matches?locale=${locale}`, { cache: "no-store" });
if (!res.ok) {
const body = await res.json().catch(() => ({}));
throw new Error(body.detail || `Fehler ${res.status}`);
@@ -43,7 +46,7 @@ export default function Home() {
} catch (e) {
setError(e instanceof Error ? e.message : "Verbindung fehlgeschlagen");
}
- }, []);
+ }, [locale]);
useEffect(() => {
load();
@@ -67,37 +70,37 @@ export default function Home() {
WM 26
- USA · Kanada · Mexiko
+ {dict.header.hostCountries}
{error
- ? "Feed offline"
+ ? dict.status.feedOffline
: data
- ? anyLive ? "Live" : `Aktualisiert ${new Date(data.updatedAt).toLocaleTimeString("de-DE")}`
- : "Lade Daten…"}
+ ? anyLive ? dict.status.live : dict.status.updated(new Date(data.updatedAt).toLocaleTimeString(locale === "en" ? "en-US" : "de-DE"))
+ : dict.status.loading}
setTab("kofixtures")}>
- K.O.-Spiele
+ {dict.nav.koFixtures}
setTab("groups")}>
- Gruppen
+ {dict.nav.groups}
{ if (!fixturesGroup) setFixturesGroup("A"); setTab("groupfixtures"); }}
>
- {fixturesGroup ? `Gruppenspiele – ${fixturesGroup}` : "Gruppenspiele"}
+ {fixturesGroup ? dict.nav.groupFixtures(fixturesGroup) : dict.nav.groupFixturesNoGroup}
setTab("thirds")}>
- Drittplatzierte
+ {dict.nav.thirdPlace}
setTab("bracket")}>
- K.o.-Baum
+ {dict.nav.bracket}
setTab("sim")}>
- Simulation
+ {dict.nav.simulation}
@@ -108,9 +111,7 @@ export default function Home() {
{error && (
- Die Live-Feeds sind gerade nicht erreichbar: {error}.
- Prüfe den FOOTBALL_DATA_TOKEN und die Netzwerkfreigabe des Servers.
- Die Seite versucht es automatisch erneut.
+ {dict.error.feedUnreachable}
)}
@@ -121,32 +122,32 @@ export default function Home() {
)}
{data && tab === "kofixtures" && (
-
+
)}
{data && tab === "groups" && (
)}
{data && tab === "groupfixtures" && fixturesGroup && (
)}
{data && tab === "thirds" && (
-
+
)}
{data && tab === "bracket" && (
)}
{data && tab === "sim" && (
-
+
)}
@@ -182,13 +183,13 @@ export default function Home() {
fontFamily: "var(--font-mono)", fontSize: 10,
color: "var(--ink-faint)",
}}>
- WM 2026 Dashboard
+ {dict.footer.dashboard}
- Daten: football-data.org · Polymarket Gamma API · FIFA Annex C
+ {dict.footer.dataSources}
diff --git a/app/api/matches/route.ts b/app/api/matches/route.ts
index fd2c530..0472c51 100644
--- a/app/api/matches/route.ts
+++ b/app/api/matches/route.ts
@@ -1,4 +1,5 @@
import { NextResponse } from "next/server";
+import type { NextRequest } from "next/server";
import { fetchMatchesAndTeams, fetchOdds, attachOdds, attachKOOdds, fetchFifaScores, applyFifaScores, assignKONumbersBySlots, attachFifaGoals } from "@/lib/feeds";
import { computeGroupTables, computeThirdPlaceTable } from "@/lib/standings";
import { qualifiedThirdGroups, resolveAnnexC } from "@/lib/bracket";
@@ -8,7 +9,8 @@ import { securelyQualifiedThirdTeams } from "@/lib/third-place-security";
// Upstream-Feeds berührt — gecacht, damit Rate Limits eingehalten werden.
export const dynamic = "force-dynamic";
-export async function GET() {
+export async function GET(request: NextRequest) {
+ const locale = request.nextUrl.searchParams.get("locale") || "de";
try {
const { matches: rawMatches, teams } = await fetchMatchesAndTeams();
@@ -30,10 +32,10 @@ export async function GET() {
}
try {
- const fifaData = await fetchFifaScores();
+ const fifaData = await fetchFifaScores(locale);
matches = applyFifaScores(matches, teams, fifaData);
try {
- matches = await attachFifaGoals(matches, fifaData);
+ matches = await attachFifaGoals(matches, fifaData, locale);
} catch (err) {
console.warn("[fifa] Goals fehlgeschlagen:", err instanceof Error ? err.message : err);
}
diff --git a/lib/bracket.ts b/lib/bracket.ts
index dd9edfd..b5c42c4 100644
--- a/lib/bracket.ts
+++ b/lib/bracket.ts
@@ -1,5 +1,6 @@
import { ANNEX_C } from "./annexc-data";
import { GroupId, GroupTable, ThirdPlaceRow } from "./types";
+import { Dictionary } from "./i18n";
// Die festen Paarungen der Runde der letzten 32 (FIFA-Spielplan, Annex zur Auslosung).
// Quelle: FIFA WM 2026 Wettbewerbsregeln, Spiele 73-88.
@@ -100,14 +101,16 @@ export function slotLabel(
slot: BracketSlot,
assignment: ThirdAssignment | null,
winnerGroupForThisMatch?: GroupId,
+ dict?: Dictionary,
): string {
- if (slot.type === "W") return `Sieger ${slot.group}`;
- if (slot.type === "R") return `Zweiter ${slot.group}`;
+ const s = dict?.slot;
+ if (slot.type === "W") return s?.winner(slot.group!) ?? `Sieger ${slot.group}`;
+ if (slot.type === "R") return s?.runnerUp(slot.group!) ?? `Zweiter ${slot.group}`;
// 3. Platz
if (assignment && winnerGroupForThisMatch && assignment[winnerGroupForThisMatch]) {
- return `3. der Gruppe ${assignment[winnerGroupForThisMatch]}`;
+ return s?.thirdOfGroup(assignment[winnerGroupForThisMatch]!) ?? `3. der Gruppe ${assignment[winnerGroupForThisMatch]}`;
}
- return `3. ${slot.thirdPool?.join("/") ?? "?"}`;
+ return s?.thirdPlacePool(slot.thirdPool?.join("/") ?? "?") ?? `3. ${slot.thirdPool?.join("/") ?? "?"}`;
}
// Lookup: matchNumber → Quellspiele (fromHome, fromAway, losers).
diff --git a/lib/feeds.ts b/lib/feeds.ts
index 8ecb6b0..76dc665 100644
--- a/lib/feeds.ts
+++ b/lib/feeds.ts
@@ -181,6 +181,10 @@ export async function fetchMatchesAndTeams(): Promise<{ matches: Match[]; teams:
id, name: side.name, code: side.tla ?? "", group,
crest: `/crests/${id}.svg`,
localisedName: localisedTeamName(side.tla ?? "", side.name ?? ""),
+ localisedNames: {
+ de: localisedTeamName(side.tla ?? "", side.name ?? "", "de"),
+ en: localisedTeamName(side.tla ?? "", side.name ?? "", "en"),
+ },
});
}
}
@@ -606,12 +610,13 @@ interface FifaScores {
}
// Holt Live-Scores von der FIFA-API. Gibt Map MatchNumber → Scores + FIFA-ID→App-Code-Map zurück.
-export async function fetchFifaScores(): Promise<{
+export async function fetchFifaScores(locale: string = "de"): Promise<{
scores: Map;
fifaIdToAppCode: Map;
}> {
- return cached("fifa:scores", 45_000, async () => {
- const url = `${FIFA_BASE}/calendar/matches?language=de&count=500&idSeason=${FIFA_SEASON}`;
+ return cached(`fifa:scores:${locale}`, 45_000, async () => {
+ const lang = locale === "en" ? "en" : "de";
+ const url = `${FIFA_BASE}/calendar/matches?language=${lang}&count=500&idSeason=${FIFA_SEASON}`;
const res = await fetch(url, {
cache: "no-store",
headers: { "User-Agent": "wm2026-board/1.0" },
@@ -715,9 +720,10 @@ function normMinuteStr(min: string | null | undefined): string {
return (min ?? "").replace(/'/g, "").replace(/\s+/g, "").trim();
}
-async function fetchFifaGoals(idStage: string, idMatch: string): Promise {
- return cached(`fifa:detail:${idMatch}`, 60_000, async () => {
- const url = `${FIFA_BASE}/live/football/17/${FIFA_SEASON}/${idStage}/${idMatch}?language=de`;
+async function fetchFifaGoals(idStage: string, idMatch: string, locale: string = "de"): Promise {
+ return cached(`fifa:detail:${locale}:${idMatch}`, 60_000, async () => {
+ const lang = locale === "en" ? "en" : "de";
+ const url = `${FIFA_BASE}/live/football/17/${FIFA_SEASON}/${idStage}/${idMatch}?language=${lang}`;
const res = await fetch(url, {
cache: "no-store",
headers: { "User-Agent": "wm2026-board/1.0" },
@@ -762,6 +768,7 @@ async function fetchFifaGoals(idStage: string, idMatch: string): Promise; fifaIdToAppCode: Map },
+ locale: string = "de",
): Promise {
const targets = matches.filter(m =>
(m.status === "FINISHED" || m.status === "LIVE" || m.status === "IN_PLAY") &&
@@ -771,7 +778,7 @@ export async function attachFifaGoals(
await Promise.all(targets.map(async (m) => {
const fs = fifaData.scores.get(m.matchNumber);
if (!fs?.idMatch || !fs?.idStage) return;
- const goals = await fetchFifaGoals(fs.idStage, fs.idMatch);
+ const goals = await fetchFifaGoals(fs.idStage, fs.idMatch, locale);
if (goals.length) goalsByMatchId.set(m.id, goals);
}));
if (goalsByMatchId.size === 0) return matches;
diff --git a/lib/resolve-bracket.ts b/lib/resolve-bracket.ts
index 51eaf29..baacb77 100644
--- a/lib/resolve-bracket.ts
+++ b/lib/resolve-bracket.ts
@@ -5,6 +5,7 @@ import {
} from "@/lib/bracket";
import { placeIsSecure } from "@/lib/secure-places";
import { thirdSlotIsSecure, securelyQualifiedThirdTeams } from "@/lib/third-place-security";
+import { Dictionary } from "@/lib/i18n";
// Ein aufgelöster Teilnehmer einer K.o.-Begegnung.
export interface ResolvedSide {
@@ -84,23 +85,25 @@ function resolveR32Slot(
teams: Team[],
annexResolved: boolean,
secureTeamIds: Set,
+ dict?: Dictionary,
): { teamId: string | null; provisional: boolean; tooltip: string | null } {
+ const t = dict?.tooltips;
const table = (g: GroupId) => tables.find((t) => t.group === g);
if (slot.type === "W") {
- const t = table(slot.group!);
- const teamId = t?.rows.find((r) => r.rank === 1)?.teamId ?? null;
+ const tab = table(slot.group!);
+ const teamId = tab?.rows.find((r) => r.rank === 1)?.teamId ?? null;
// Sieger fix, sobald Platz 1 rechnerisch gesichert ist (auch vor Gruppenende).
const provisional = !placeIsSecure(slot.group!, 1, teams, matches);
- const prefix = provisional ? "aktuell " : "";
- return { teamId, provisional, tooltip: `${prefix}1. Gruppe ${slot.group}` };
+ const prefix = provisional ? (t?.provisionalPrefix ?? "aktuell") + " " : "";
+ return { teamId, provisional, tooltip: `${prefix}${t?.firstOfGroup(slot.group!) ?? `1. Gruppe ${slot.group}`}` };
}
if (slot.type === "R") {
- const t = table(slot.group!);
- const teamId = t?.rows.find((r) => r.rank === 2)?.teamId ?? null;
+ const tab = table(slot.group!);
+ const teamId = tab?.rows.find((r) => r.rank === 2)?.teamId ?? null;
// Zweiter fix, sobald Platz 2 rechnerisch gesichert ist.
const provisional = !placeIsSecure(slot.group!, 2, teams, matches);
- const prefix = provisional ? "aktuell " : "";
- return { teamId, provisional, tooltip: `${prefix}2. Gruppe ${slot.group}` };
+ const prefix = provisional ? (t?.provisionalPrefix ?? "aktuell") + " " : "";
+ return { teamId, provisional, tooltip: `${prefix}${t?.secondOfGroup(slot.group!) ?? `2. Gruppe ${slot.group}`}` };
}
// 3. Platz: braucht Annex-C-Zuordnung + den Gruppensieger dieses Spiels
if (slot.type === "3" && assignment && winnerGroup) {
@@ -116,17 +119,17 @@ function resolveR32Slot(
const teamSecure = row?.teamId ? secureTeamIds.has(row.teamId) : false;
const fix = annexResolved && slotStable && teamSecure && row?.qualifies === true;
const provisional = !fix;
- const prefix = provisional ? "aktuell " : "";
+ const prefix = provisional ? (t?.provisionalPrefix ?? "aktuell") + " " : "";
return {
teamId: row?.teamId ?? null,
provisional,
- tooltip: `${prefix}3. der Gruppe ${thirdGroup}`,
+ tooltip: `${prefix}${t?.thirdOfGroup(thirdGroup) ?? `3. der Gruppe ${thirdGroup}`}`,
};
}
}
if (slot.type === "3") {
const pool = slot.thirdPool?.join("") ?? "?";
- return { teamId: null, provisional: true, tooltip: `aktuell 3. Gruppe ${pool}` };
+ return { teamId: null, provisional: true, tooltip: t?.provisionalThird(pool) ?? `aktuell 3. Gruppe ${pool}` };
}
return { teamId: null, provisional: true, tooltip: null };
}
@@ -163,6 +166,7 @@ export function resolveBracket(
thirds: ThirdPlaceRow[], assignment: ThirdAssignment | null,
annexResolved: boolean,
resolveWinners = false,
+ dict?: Dictionary,
): { r32: ResolvedTie[]; later: Record } {
// Map: Match-Nummer -> Sieger-Team-ID (für Propagation in Folgerunden)
const winners = new Map();
@@ -171,6 +175,8 @@ export function resolveBracket(
const decided = new Map();
const secureTeamIds = securelyQualifiedThirdTeams(matches, teams);
+ const b = dict?.bracket;
+
const r32: ResolvedTie[] = R32.map((rm: R32Match) => {
const feed = feedMatch(matches, rm.matchNumber);
const homeGroup = rm.home.type === "W" ? rm.home.group : undefined;
@@ -178,10 +184,10 @@ export function resolveBracket(
// Für 3.-Platz-Slots: Gruppensieger ist die andere Seite (immer W)
const winnerGroup = (homeGroup ?? awayGroup) as GroupId | undefined;
- const h = resolveR32Slot(rm.home, winnerGroup, tables, assignment, thirds, matches, teams, annexResolved, secureTeamIds);
- const a = resolveR32Slot(rm.away, winnerGroup, tables, assignment, thirds, matches, teams, annexResolved, secureTeamIds);
- const home = sideFrom(h.teamId, slotLabel(rm.home, assignment, winnerGroup), teams, feed, "home", h.provisional, h.tooltip);
- const away = sideFrom(a.teamId, slotLabel(rm.away, assignment, winnerGroup), teams, feed, "away", a.provisional, a.tooltip);
+ const h = resolveR32Slot(rm.home, winnerGroup, tables, assignment, thirds, matches, teams, annexResolved, secureTeamIds, dict);
+ const a = resolveR32Slot(rm.away, winnerGroup, tables, assignment, thirds, matches, teams, annexResolved, secureTeamIds, dict);
+ const home = sideFrom(h.teamId, slotLabel(rm.home, assignment, winnerGroup, dict), teams, feed, "home", h.provisional, h.tooltip);
+ const away = sideFrom(a.teamId, slotLabel(rm.away, assignment, winnerGroup, dict), teams, feed, "away", a.provisional, a.tooltip);
const feedWinner = winnerOf(feed);
if (resolveWinners && feed && h.teamId && a.teamId
@@ -223,10 +229,19 @@ export function resolveBracket(
// Ein Folgeteam ist fix, wenn das speisende Spiel beendet ist.
const homeProv = !(decided.get(km.fromHome) ?? false);
const awayProv = !(decided.get(km.fromAway) ?? false);
- const homeLabel = `${km.losers ? "Verlierer" : "Sieger"} ${km.fromHome}`;
- const awayLabel = `${km.losers ? "Verlierer" : "Sieger"} ${km.fromAway}`;
- const homeTtip = `${km.losers ? "Verlierer" : "Sieger"} aus Spiel ${km.fromHome}`;
- const awayTtip = `${km.losers ? "Verlierer" : "Sieger"} aus Spiel ${km.fromAway}`;
+ const loserLabel = km.losers ? true : false;
+ const homeLabel = loserLabel
+ ? (b?.loser ?? "Verlierer") + " " + km.fromHome
+ : (b?.winner ?? "Sieger") + " " + km.fromHome;
+ const awayLabel = loserLabel
+ ? (b?.loser ?? "Verlierer") + " " + km.fromAway
+ : (b?.winner ?? "Sieger") + " " + km.fromAway;
+ const homeTtip = loserLabel
+ ? (b?.loserFromMatch(km.fromHome) ?? `Verlierer aus Spiel ${km.fromHome}`)
+ : (b?.winnerFromMatch(km.fromHome) ?? `Sieger aus Spiel ${km.fromHome}`);
+ const awayTtip = loserLabel
+ ? (b?.loserFromMatch(km.fromAway) ?? `Verlierer aus Spiel ${km.fromAway}`)
+ : (b?.winnerFromMatch(km.fromAway) ?? `Sieger aus Spiel ${km.fromAway}`);
const home = sideFrom(homeId, homeLabel, teams, feed, "home", homeProv, homeTtip);
const away = sideFrom(awayId, awayLabel, teams, feed, "away", awayProv, awayTtip);
diff --git a/lib/types.ts b/lib/types.ts
index 0b44a0f..684bfe9 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -16,6 +16,13 @@ export interface Team {
group: GroupId;
crest?: string | null; // URL zur Flagge / zum Wappen (football-data: crest)
localisedName: string; // Lokalisierter Anzeigename (z.B. "Deutschland")
+ localisedNames?: { de: string; en: string };
+}
+
+export function teamName(team: Team | undefined, locale: string): string {
+ if (!team) return "—";
+ if (locale === "en") return team.localisedNames?.en ?? team.name ?? "—";
+ return team.localisedNames?.de ?? team.name ?? "—";
}
export type MatchStatus =