完善多语言支持
This commit is contained in:
@@ -4,13 +4,33 @@ import i18n from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
|
||||
import en from "./locales/en.json";
|
||||
import hi from "./locales/hi.json";
|
||||
import id from "./locales/id.json";
|
||||
import ms from "./locales/ms.json";
|
||||
import th from "./locales/th.json";
|
||||
import vi from "./locales/vi.json";
|
||||
import zh from "./locales/zh.json";
|
||||
|
||||
const RESOURCES = {
|
||||
en: { translation: en },
|
||||
zh: { translation: zh },
|
||||
hi: { translation: hi },
|
||||
id: { translation: id },
|
||||
ms: { translation: ms },
|
||||
th: { translation: th },
|
||||
vi: { translation: vi },
|
||||
};
|
||||
|
||||
export const SUPPORTED_LANGUAGES = [
|
||||
{ code: "en", name: "English" },
|
||||
{ code: "zh", name: "中文" },
|
||||
{ code: "hi", name: "हिन्दी" },
|
||||
{ code: "id", name: "Bahasa Indonesia" },
|
||||
{ code: "ms", name: "Bahasa Melayu" },
|
||||
{ code: "th", name: "ไทย" },
|
||||
{ code: "vi", name: "Tiếng Việt" },
|
||||
];
|
||||
|
||||
const LANGUAGE_STORAGE_KEY = "user_language_preference";
|
||||
|
||||
const initI18n = async () => {
|
||||
|
||||
Reference in New Issue
Block a user