-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathi18n.js
78 lines (75 loc) · 1.67 KB
/
i18n.js
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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";
import { es, spanish } from "./locales/es";
import { da, danish } from "./locales/da";
import { de, german } from "./locales/de";
import { vi, vietnamese } from "./locales/vi";
import { pt, portuguese } from "./locales/pt-br";
import { fa, persian } from "./locales/fa";
import { hi, hindi } from "./locales/hi";
import { uk, ukrainian } from "./locales/uk";
import { ru, russian } from "./locales/ru";
import { tr, turkish } from "./locales/tr";
import { mr, marathi } from "./locales/mr";
import { fr, french } from "./locales/fr";
import { pa, punjabi } from "./locales/pa";
import { hy, armenian } from "./locales/hy";
import { ar, arabic } from "./locales/ar";
import { zh_tw, traditionalChinese } from "./locales/zh-tw";
import { az, azerbaijani } from "./locales/az";
export const languages = [
english,
chinese,
danish,
spanish,
german,
vietnamese,
portuguese,
persian,
hindi,
marathi,
ukrainian,
russian,
turkish,
french,
punjabi,
armenian,
arabic,
traditionalChinese,
azerbaijani,
].sort((a, b) => a.name.localeCompare(b.name));
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
fallbackLng: "en",
debug: false,
interpolation: {
escapeValue: false,
},
resources: {
en,
zh,
es,
da,
de,
vi,
pt,
fa,
hi,
mr,
uk,
ru,
tr,
fr,
pa,
hy,
ar,
zh_tw,
az,
},
});
export default i18n;