Skip to content

Commit

Permalink
feat: Support Persian
Browse files Browse the repository at this point in the history
  • Loading branch information
MystiPanda committed Mar 21, 2024
1 parent ddf6760 commit 3dbb71a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/setting/setting-verge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { LayoutViewer } from "./mods/layout-viewer";
import { UpdateViewer } from "./mods/update-viewer";
import getSystem from "@/utils/get-system";
import { routers } from "@/pages/_routers";
import { appWindow } from "@tauri-apps/api/window";

interface Props {
onError?: (err: Error) => void;
}
Expand Down Expand Up @@ -97,6 +97,7 @@ const SettingVerge = ({ onError }: Props) => {
<MenuItem value="zh">中文</MenuItem>
<MenuItem value="en">English</MenuItem>
<MenuItem value="ru">Русский</MenuItem>
<MenuItem value="fa">فارسی</MenuItem>
</Select>
</GuardState>
</SettingItem>
Expand Down
1 change: 1 addition & 0 deletions src/locales/fa.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions src/services/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ import { initReactI18next } from "react-i18next";
import en from "@/locales/en.json";
import ru from "@/locales/ru.json";
import zh from "@/locales/zh.json";
import fa from "@/locales/fa.json";

const resources = {
en: { translation: en },
ru: { translation: ru },
zh: { translation: zh },
fa: { translation: fa },
};

i18n.use(initReactI18next).init({
resources,
lng: "en",
fallbackLng: "en",
interpolation: {
escapeValue: false,
},
Expand Down

0 comments on commit 3dbb71a

Please sign in to comment.