|
1 | 1 | import i18n from "i18next"; |
2 | | -import ar from "./locales/ar-SA.json"; |
3 | | -import de from "./locales/de-DE.json"; |
4 | | -import en from "./locales/en-US.json"; |
5 | | -import es from "./locales/es-ES.json"; |
6 | | -import fr from "./locales/fr-FR.json"; |
7 | | -import he from "./locales/he-IL.json"; |
8 | | -import hi from "./locales/hi-IN.json"; |
9 | | -import it from "./locales/it-IT.json"; |
10 | | -import ja from "./locales/ja-JP.json"; |
11 | | -import ko from "./locales/ko-KR.json"; |
12 | | -import pt from "./locales/pt-BR.json"; |
13 | | -import ru from "./locales/ru-RU.json"; |
14 | | -import tr from "./locales/tr-TR.json"; |
15 | | -import uk from "./locales/uk-UA.json"; |
16 | | -import ur from "./locales/ur-UR.json"; |
17 | | -import vi from "./locales/vi-VN.json"; |
18 | | -import zh from "./locales/zh-CN.json"; |
19 | | -import pl from "./locales/pl-PL.json"; |
| 2 | +import arSA from "./locales/ar-SA.json"; |
| 3 | +import deDE from "./locales/de-DE.json"; |
| 4 | +import enUS from "./locales/en-US.json"; |
| 5 | +import esES from "./locales/es-ES.json"; |
| 6 | +import frFR from "./locales/fr-FR.json"; |
| 7 | +import heIL from "./locales/he-IL.json"; |
| 8 | +import hiIN from "./locales/hi-IN.json"; |
| 9 | +import itIT from "./locales/it-IT.json"; |
| 10 | +import jaJP from "./locales/ja-JP.json"; |
| 11 | +import koKR from "./locales/ko-KR.json"; |
| 12 | +import ptBR from "./locales/pt-BR.json"; |
| 13 | +import ptPT from "./locales/pt-PT.json"; |
| 14 | +import ruRU from "./locales/ru-RU.json"; |
| 15 | +import trTR from "./locales/tr-TR.json"; |
| 16 | +import ukUA from "./locales/uk-UA.json"; |
| 17 | +import urUR from "./locales/ur-UR.json"; |
| 18 | +import viVN from "./locales/vi-VN.json"; |
| 19 | +import zhCN from "./locales/zh-CN.json"; |
| 20 | +import plPL from "./locales/pl-PL.json"; |
20 | 21 |
|
21 | 22 | const resources = { |
22 | | - ar: { translation: ar }, |
23 | | - de: { translation: de }, |
24 | | - en: { translation: en }, |
25 | | - es: { translation: es }, |
26 | | - fr: { translation: fr }, |
27 | | - he: { translation: he }, |
28 | | - hi: { translation: hi }, |
29 | | - it: { translation: it }, |
30 | | - ja: { translation: ja }, |
31 | | - ko: { translation: ko }, |
32 | | - pt: { translation: pt }, |
33 | | - ru: { translation: ru }, |
34 | | - tr: { translation: tr }, |
35 | | - uk: { translation: uk }, |
36 | | - ur: { translation: ur }, |
37 | | - vi: { translation: vi }, |
38 | | - zh: { translation: zh }, |
39 | | - pl: { translation: pl }, |
| 23 | + "ar-SA": { translation: arSA }, |
| 24 | + "de-DE": { translation: deDE }, |
| 25 | + "en-US": { translation: enUS }, |
| 26 | + "es-ES": { translation: esES }, |
| 27 | + "fr-FR": { translation: frFR }, |
| 28 | + "he-IL": { translation: heIL }, |
| 29 | + "hi-IN": { translation: hiIN }, |
| 30 | + "it-IT": { translation: itIT }, |
| 31 | + "ja-JP": { translation: jaJP }, |
| 32 | + "ko-KR": { translation: koKR }, |
| 33 | + "pt-BR": { translation: ptBR }, |
| 34 | + "pt-PT": { translation: ptPT }, |
| 35 | + "ru-RU": { translation: ruRU }, |
| 36 | + "tr-TR": { translation: trTR }, |
| 37 | + "uk-UA": { translation: ukUA }, |
| 38 | + "ur-UR": { translation: urUR }, |
| 39 | + "vi-VN": { translation: viVN }, |
| 40 | + "zh-CN": { translation: zhCN }, |
| 41 | + "pl-PL": { translation: plPL }, |
40 | 42 | }; |
41 | 43 |
|
42 | | -export const initI18n = (lng = "en") => { |
| 44 | +export const initI18n = (lng = "en-US") => { |
43 | 45 | if (!i18n.isInitialized) { |
44 | 46 | i18n.init({ |
45 | 47 | resources, |
46 | 48 | lng, |
47 | | - fallbackLng: "en", |
| 49 | + fallbackLng: "en-US", |
48 | 50 | interpolation: { |
49 | 51 | escapeValue: false, |
50 | 52 | }, |
|
0 commit comments