feat(I18n): Add multiple languages ​​(zh-CN/zh-TW/en/it) (#8)

This commit is contained in:
GuGuGu
2024-11-29 13:47:09 +01:00
committed by GitHub
parent 5850fe7fca
commit 47f092918e
44 changed files with 1138 additions and 366 deletions

View File

@@ -5,17 +5,20 @@ import {
} from "@/components/ui/tabs"
import { Link, useLocation } from "react-router-dom"
import { useTranslation } from "react-i18next";
export const GroupTab = ({ className }: { className?: string }) => {
const { t } = useTranslation();
const location = useLocation();
return (
<Tabs defaultValue={location.pathname} className={className}>
<TabsList className="grid w-full grid-cols-2">
<TabsTrigger value="/dashboard/server-group" asChild>
<Link to="/dashboard/server-group">Server</Link>
<Link to="/dashboard/server-group">{t("Server")}</Link>
</TabsTrigger>
<TabsTrigger value="/dashboard/notification-group" asChild>
<Link to="/dashboard/notification-group">Notification</Link>
<Link to="/dashboard/notification-group">{t("Notification")}</Link>
</TabsTrigger>
</TabsList>
</Tabs>