File size: 459 Bytes
cd6f98e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import i18next from "i18next";
import { initReactI18next } from "react-i18next";

await i18next.use(initReactI18next).init({
  fallbackLng: ["en"],
  debug: true,
  interpolation: {
    escapeValue: false, // react already safes from xss
  },
  keySeparator: false,
  react: {
    useSuspense: false,
  },
  defaultNS: "translation",
  backend: {
    loadPath: "./public/locales/{{lng}}/{{ns}}.json",
    crossDomain: false,
  },
});

export default i18next;