Files
Termix/src/i18n/i18n.ts
T

211 lines
5.2 KiB
TypeScript
Raw Normal View History

2025-09-12 14:42:00 -05:00
import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector";
+1
2025-12-31 22:20:12 -06:00
import enTranslation from "../locales/en.json";
+4
2026-02-12 22:28:13 -06:00
import afTranslation from "../locales/translated/af_ZA.json";
import arTranslation from "../locales/translated/ar_SA.json";
import bnTranslation from "../locales/translated/bn_BD.json";
import bgTranslation from "../locales/translated/bg_BG.json";
import caTranslation from "../locales/translated/ca_ES.json";
import csTranslation from "../locales/translated/cs_CZ.json";
import daTranslation from "../locales/translated/da_DK.json";
import deTranslation from "../locales/translated/de_DE.json";
import elTranslation from "../locales/translated/el_GR.json";
import esESTranslation from "../locales/translated/es_ES.json";
import fiTranslation from "../locales/translated/fi_FI.json";
import frTranslation from "../locales/translated/fr_FR.json";
import heTranslation from "../locales/translated/he_IL.json";
import hiTranslation from "../locales/translated/hi_IN.json";
import huTranslation from "../locales/translated/hu_HU.json";
import idTranslation from "../locales/translated/id_ID.json";
import itTranslation from "../locales/translated/it_IT.json";
import jaTranslation from "../locales/translated/ja_JP.json";
import koTranslation from "../locales/translated/ko_KR.json";
import nlTranslation from "../locales/translated/nl_NL.json";
import noTranslation from "../locales/translated/no_NO.json";
import plTranslation from "../locales/translated/pl_PL.json";
import ptPTTranslation from "../locales/translated/pt_PT.json";
import ptBRTranslation from "../locales/translated/pt_BR.json";
import roTranslation from "../locales/translated/ro_RO.json";
import ruTranslation from "../locales/translated/ru_RU.json";
import srTranslation from "../locales/translated/sr_SP.json";
import svSETranslation from "../locales/translated/sv_SE.json";
import thTranslation from "../locales/translated/th_TH.json";
import trTranslation from "../locales/translated/tr_TR.json";
import ukTranslation from "../locales/translated/uk_UA.json";
import viTranslation from "../locales/translated/vi_VN.json";
import zhCNTranslation from "../locales/translated/zh_CN.json";
import zhTWTranslation from "../locales/translated/zh_TW.json";
2025-09-03 00:14:49 -05:00
i18n
2025-09-12 14:42:00 -05:00
.use(LanguageDetector)
.use(initReactI18next)
2025-09-03 00:14:49 -05:00
.init({
+1
2025-12-31 22:20:12 -06:00
supportedLngs: [
"en",
2026-01-24 19:49:42 -06:00
"af",
+1
2025-12-31 22:20:12 -06:00
"ar",
2026-01-24 19:49:42 -06:00
"bn",
"bg",
"ca",
+1
2025-12-31 22:20:12 -06:00
"cs",
2026-01-24 19:49:42 -06:00
"da",
"de",
+1
2025-12-31 22:20:12 -06:00
"el",
+4
2026-02-12 22:28:13 -06:00
"es-ES",
2026-01-24 19:49:42 -06:00
"fi",
"fr",
"he",
"hi",
"hu",
"id",
"it",
"ja",
"ko",
"nl",
"no",
"pl",
+4
2026-02-12 22:28:13 -06:00
"pt-PT",
"pt-BR",
2026-01-24 19:49:42 -06:00
"ro",
"ru",
"sr",
+4
2026-02-12 22:28:13 -06:00
"sv-SE",
2026-01-24 19:49:42 -06:00
"th",
"tr",
"uk",
"vi",
+4
2026-02-12 22:28:13 -06:00
"zh-CN",
"zh-TW",
+1
2025-12-31 22:20:12 -06:00
],
2025-09-12 14:42:00 -05:00
fallbackLng: "en",
2025-09-03 00:14:49 -05:00
debug: false,
2025-09-12 14:42:00 -05:00
2025-09-03 00:14:49 -05:00
detection: {
2025-09-12 14:42:00 -05:00
order: ["localStorage", "cookie"],
caches: ["localStorage", "cookie"],
lookupLocalStorage: "i18nextLng",
lookupCookie: "i18nextLng",
2025-09-03 00:14:49 -05:00
checkWhitelist: true,
},
2025-09-12 14:42:00 -05:00
resources: {
en: {
translation: enTranslation,
},
2026-01-24 19:49:42 -06:00
af: {
translation: afTranslation,
+1
2025-12-31 22:20:12 -06:00
},
ar: {
translation: arTranslation,
},
2026-01-24 19:49:42 -06:00
bn: {
translation: bnTranslation,
+1
2025-12-31 22:20:12 -06:00
},
2026-01-24 19:49:42 -06:00
bg: {
translation: bgTranslation,
+1
2025-12-31 22:20:12 -06:00
},
2026-01-24 19:49:42 -06:00
ca: {
translation: caTranslation,
+1
2025-12-31 22:20:12 -06:00
},
cs: {
translation: csTranslation,
},
2026-01-24 19:49:42 -06:00
da: {
translation: daTranslation,
},
de: {
translation: deTranslation,
+1
2025-12-31 22:20:12 -06:00
},
el: {
translation: elTranslation,
},
+4
2026-02-12 22:28:13 -06:00
"es-ES": {
translation: esESTranslation,
2026-01-24 19:49:42 -06:00
},
fi: {
translation: fiTranslation,
},
fr: {
translation: frTranslation,
},
he: {
translation: heTranslation,
},
hi: {
translation: hiTranslation,
},
hu: {
translation: huTranslation,
},
id: {
translation: idTranslation,
},
it: {
translation: itTranslation,
},
ja: {
translation: jaTranslation,
},
ko: {
translation: koTranslation,
},
nl: {
translation: nlTranslation,
},
no: {
translation: noTranslation,
},
pl: {
translation: plTranslation,
},
+4
2026-02-12 22:28:13 -06:00
"pt-PT": {
translation: ptPTTranslation,
},
"pt-BR": {
translation: ptBRTranslation,
2026-01-24 19:49:42 -06:00
},
ro: {
translation: roTranslation,
},
ru: {
translation: ruTranslation,
},
sr: {
translation: srTranslation,
},
+4
2026-02-12 22:28:13 -06:00
"sv-SE": {
translation: svSETranslation,
2026-01-24 19:49:42 -06:00
},
th: {
translation: thTranslation,
},
tr: {
translation: trTranslation,
},
uk: {
translation: ukTranslation,
},
vi: {
translation: viTranslation,
},
+4
2026-02-12 22:28:13 -06:00
"zh-CN": {
translation: zhCNTranslation,
},
"zh-TW": {
translation: zhTWTranslation,
+1
2025-12-31 22:20:12 -06:00
},
2025-09-03 00:14:49 -05:00
},
2025-09-12 14:42:00 -05:00
2025-09-03 00:14:49 -05:00
interpolation: {
2025-09-12 14:42:00 -05:00
escapeValue: false,
2025-09-03 00:14:49 -05:00
},
2025-09-12 14:42:00 -05:00
2025-09-03 00:14:49 -05:00
react: {
2025-09-12 14:42:00 -05:00
useSuspense: false,
2025-09-03 00:14:49 -05:00
},
});
2025-09-12 14:42:00 -05:00
export default i18n;