feat: add support for additional languages in LanguageSwitcher and SidebarUserProfile components

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-02-11 00:39:01 -08:00
parent c297e41caa
commit 1daa953e83
7 changed files with 2478 additions and 7 deletions

View file

@ -24,6 +24,9 @@ import type { User } from "../../types/layout.types";
// Supported languages configuration
const LANGUAGES = [
{ code: "en" as const, name: "English", flag: "🇺🇸" },
{ code: "es" as const, name: "Español", flag: "🇪🇸" },
{ code: "pt" as const, name: "Português", flag: "🇧🇷" },
{ code: "hi" as const, name: "हिन्दी", flag: "🇮🇳" },
{ code: "zh" as const, name: "简体中文", flag: "🇨🇳" },
];
@ -131,7 +134,7 @@ export function SidebarUserProfile({
const initials = getInitials(user.email);
const displayName = user.name || user.email.split("@")[0];
const handleLanguageChange = (newLocale: "en" | "zh") => {
const handleLanguageChange = (newLocale: "en" | "es" | "pt" | "hi" | "zh") => {
setLocale(newLocale);
};