2024-05-16 11:44:39 +08:00
|
|
|
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";
|
2024-05-16 15:44:07 +08:00
|
|
|
import { da, danish } from "./locales/da";
|
2024-05-17 23:52:34 +08:00
|
|
|
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-05-19 23:32:14 +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-05-16 11:44:39 +08:00
|
|
|
|
2024-05-17 08:49:18 +08:00
|
|
|
export const languages = [
|
|
|
|
english,
|
|
|
|
chinese,
|
|
|
|
danish,
|
|
|
|
spanish,
|
2024-05-17 23:52:34 +08:00
|
|
|
german,
|
2024-05-18 00:03:42 +08:00
|
|
|
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-05-29 17:20:52 +08:00
|
|
|
ukrainian,
|
|
|
|
russian,
|
2024-05-17 08:49:18 +08:00
|
|
|
].sort((a, b) => a.name.localeCompare(b.name));
|
2024-05-16 11:44:39 +08:00
|
|
|
|
|
|
|
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,
|
2024-05-16 15:44:07 +08:00
|
|
|
da,
|
2024-05-17 23:52:34 +08:00
|
|
|
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-05-29 17:20:52 +08:00
|
|
|
uk,
|
|
|
|
ru,
|
2024-05-16 11:44:39 +08:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default i18n;
|