Initial commit
This commit is contained in:
20
src/i18n/i18n.ts
Normal file
20
src/i18n/i18n.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import i18n from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
import { getDefaultLanguage, translationResources } from "./helper";
|
||||
|
||||
i18n.use(initReactI18next).init({
|
||||
// debug: true,
|
||||
resources: translationResources,
|
||||
returnNull: false, // update the initialization so the behavior matches the type (don't return null)
|
||||
lng: getDefaultLanguage(),
|
||||
supportedLngs: ["ar", "en"],
|
||||
fallbackLng: "en",
|
||||
interpolation: {
|
||||
escapeValue: false, // not needed for react as it escapes by default
|
||||
},
|
||||
react: {
|
||||
useSuspense: true,
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user