drawDB/src/i18n/i18n.js

79 lines
1.7 KiB
JavaScript
Raw Normal View History

import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector";
import { en, english } from "./locales/en";
import { zh, chinese } from "./locales/zh";
2024-05-17 00:10:15 +08:00
import { es, spanish } from "./locales/es";
import { da, danish } from "./locales/da";
import { de, german } from "./locales/de";
2024-05-17 19:02:22 +08:00
import { vi, vietnamese } from "./locales/vi";
2024-05-18 04:15:18 +08:00
import { pt, portuguese } from "./locales/pt-br";
2024-07-26 01:43:34 +08:00
import { fa, persian } from "./locales/fa";
2024-05-24 04:22:40 +08:00
import { hi, hindi } from "./locales/hi";
2024-05-28 21:18:11 +08:00
import { uk, ukrainian } from "./locales/uk";
2024-05-29 17:20:52 +08:00
import { ru, russian } from "./locales/ru";
2024-07-26 15:54:31 +08:00
import { tr, turkish } from "./locales/tr";
2024-07-26 01:43:34 +08:00
import { mr, marathi } from "./locales/mr";
2024-07-26 01:29:21 +08:00
import { fr, french } from "./locales/fr";
2024-07-29 16:26:49 +08:00
import { he, hebrew } from "./locales/he";
2024-07-26 01:43:34 +08:00
import { pa, punjabi } from "./locales/pa";
2024-07-28 00:57:12 +08:00
import { hy, armenian } from "./locales/hy";
import { ar, arabic } from "./locales/ar";
import { zh_tw, traditionalChinese } from "./locales/zh-tw";
2024-05-17 08:49:18 +08:00
export const languages = [
english,
chinese,
danish,
spanish,
german,
vietnamese,
2024-05-19 23:32:14 +08:00
portuguese,
2024-05-24 04:22:40 +08:00
persian,
2024-05-28 21:18:11 +08:00
hindi,
2024-07-25 03:26:45 +08:00
marathi,
2024-05-29 17:20:52 +08:00
ukrainian,
russian,
2024-07-25 20:25:13 +08:00
turkish,
2024-07-26 01:29:21 +08:00
french,
2024-07-26 01:43:34 +08:00
punjabi,
2024-07-28 00:57:12 +08:00
armenian,
arabic,
traditionalChinese,
2024-07-29 16:26:49 +08:00
hebrew,
2024-05-17 08:49:18 +08:00
].sort((a, b) => a.name.localeCompare(b.name));
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
fallbackLng: "en",
debug: false,
interpolation: {
escapeValue: false,
},
resources: {
en,
zh,
2024-05-17 00:10:15 +08:00
es,
da,
de,
2024-05-17 19:02:22 +08:00
vi,
2024-05-19 23:32:14 +08:00
pt,
2024-05-24 04:22:40 +08:00
fa,
2024-05-28 21:18:11 +08:00
hi,
2024-07-25 03:26:45 +08:00
mr,
2024-05-29 17:20:52 +08:00
uk,
ru,
2024-07-25 20:25:13 +08:00
tr,
2024-07-26 01:29:21 +08:00
fr,
2024-07-26 01:43:34 +08:00
pa,
2024-07-28 00:57:12 +08:00
hy,
ar,
zh_tw,
2024-07-29 16:26:49 +08:00
he,
},
});
export default i18n;