-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathi18n.ts
58 lines (54 loc) · 1.47 KB
/
i18n.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import ar from "./lang/ar.json";
import de from "./lang/de.json";
import en from "./lang/en.json";
import es from "./lang/es.json";
import fr from "./lang/fr.json";
import hi from "./lang/hi.json";
import hy from "./lang/hy.json";
import id from "./lang/id.json";
import it from "./lang/it.json";
import ja from "./lang/ja.json";
import ko from "./lang/ko.json";
import lt from "./lang/lt.json";
import nl from "./lang/nl.json";
import pl from "./lang/pl.json";
import pt from "./lang/pt.json";
import ru from "./lang/ru.json";
import th from "./lang/th.json";
import tr from "./lang/tr.json";
import vi from "./lang/vi.json";
import zh from "./lang/zh.json";
export const defaultNS = "translation";
export const resources = {
ar: { [defaultNS]: ar },
de: { [defaultNS]: de },
en: { [defaultNS]: en },
es: { [defaultNS]: es },
fr: { [defaultNS]: fr },
hi: { [defaultNS]: hi },
hy: { [defaultNS]: hy },
id: { [defaultNS]: id },
it: { [defaultNS]: it },
ja: { [defaultNS]: ja },
ko: { [defaultNS]: ko },
lt: { [defaultNS]: lt },
nl: { [defaultNS]: nl },
pl: { [defaultNS]: pl },
pt: { [defaultNS]: pt },
ru: { [defaultNS]: ru },
th: { [defaultNS]: th },
tr: { [defaultNS]: tr },
vi: { [defaultNS]: vi },
zh: { [defaultNS]: zh },
} as const;
i18n.use(initReactI18next).init({
resources,
defaultNS,
lng: "en",
interpolation: {
escapeValue: false,
},
});
export default i18n;