From 00ba8b25a98a091cccbb15c9e928e0cb7cb82a5e Mon Sep 17 00:00:00 2001
From: Teknium <127238744+teknium1@users.noreply.github.com>
Date: Thu, 16 Apr 2026 16:36:12 -0700
Subject: [PATCH] fix(web): show current language's flag in switcher, not
target (#11262)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The language switcher displayed the *other* language's flag (clicking
the Chinese flag switched to Chinese). This is dissonant — a flag reads
as a state indicator first, so seeing the Chinese flag while the UI is
in English feels wrong. Users expect the flag to reflect the current
language, like every other status indicator.
Flips the flag and label ternaries so English shows UK + EN, Chinese
shows CN + 中文. Tooltip text ("Switch to Chinese" / "切换到英文") still
communicates the click action, which is where that belongs.
---
web/src/components/LanguageSwitcher.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/src/components/LanguageSwitcher.tsx b/web/src/components/LanguageSwitcher.tsx
index fb9b8d21856..02f35a9daa8 100644
--- a/web/src/components/LanguageSwitcher.tsx
+++ b/web/src/components/LanguageSwitcher.tsx
@@ -17,10 +17,10 @@ export function LanguageSwitcher() {
title={t.language.switchTo}
aria-label={t.language.switchTo}
>
- {/* Show the *other* language's flag as the clickable target */}
- {locale === "en" ? "🇨🇳" : "🇬🇧"}
+ {/* Show the *current* language's flag — tooltip advertises the click action */}
+ {locale === "en" ? "🇬🇧" : "🇨🇳"}
- {locale === "en" ? "中文" : "EN"}
+ {locale === "en" ? "EN" : "中文"}
);