From f97934d6e0472be52fe896f870d2015579aa8718 Mon Sep 17 00:00:00 2001 From: E66Crisp Date: Wed, 31 Dec 2025 10:48:02 +0800 Subject: [PATCH] feat(i18n): sync Draw.io panel language with app locale (#473) --- app/[lang]/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/[lang]/page.tsx b/app/[lang]/page.tsx index c446eb3..69e2a96 100644 --- a/app/[lang]/page.tsx +++ b/app/[lang]/page.tsx @@ -28,6 +28,8 @@ export default function Home() { } = useDiagram() const router = useRouter() const pathname = usePathname() + // Extract current language from pathname (e.g., "/zh/about" → "zh") + const currentLang = (pathname.split("/")[1] || i18n.defaultLocale) as Locale const [isMobile, setIsMobile] = useState(false) const [isChatVisible, setIsChatVisible] = useState(true) const [drawioUi, setDrawioUi] = useState<"min" | "sketch">("min") @@ -207,7 +209,7 @@ export default function Home() {
{isLoaded ? ( ) : (