mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 09:37:37 +08:00
feat(i18n): add Traditional Chinese localization (#3093)
* Add Traditional Chinese localization * fix: address zh-TW formatting and token units - Format `zh-TW.json` with Prettier. - Use Traditional Chinese `萬` and `億` units for zh-TW token summaries. - Add usage formatting coverage for Traditional Chinese locale aliases. --------- Co-authored-by: Jason <farion1231@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { Button } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
type LanguageOption = "zh" | "en" | "ja";
|
||||
type LanguageOption = "zh" | "zh-TW" | "en" | "ja";
|
||||
|
||||
interface LanguageSettingsProps {
|
||||
value: LanguageOption;
|
||||
@@ -24,6 +24,12 @@ export function LanguageSettings({ value, onChange }: LanguageSettingsProps) {
|
||||
<LanguageButton active={value === "zh"} onClick={() => onChange("zh")}>
|
||||
{t("settings.languageOptionChinese")}
|
||||
</LanguageButton>
|
||||
<LanguageButton
|
||||
active={value === "zh-TW"}
|
||||
onClick={() => onChange("zh-TW")}
|
||||
>
|
||||
{t("settings.languageOptionTraditionalChinese")}
|
||||
</LanguageButton>
|
||||
<LanguageButton active={value === "en"} onClick={() => onChange("en")}>
|
||||
{t("settings.languageOptionEnglish")}
|
||||
</LanguageButton>
|
||||
|
||||
Reference in New Issue
Block a user