mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
feat: add support for additional languages in LanguageSwitcher and SidebarUserProfile components
This commit is contained in:
parent
c297e41caa
commit
1daa953e83
7 changed files with 2478 additions and 7 deletions
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue