forked from BLC/sgeUpdated
Add 'sge-frontend/' from commit '5fa787e054b25ac53edc7ff0275ea7960a709401'
git-subtree-dir: sge-frontend git-subtree-mainline:876c278ac4git-subtree-split:5fa787e054
This commit is contained in:
29
sge-frontend/src/i18n.js
Normal file
29
sge-frontend/src/i18n.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import i18n from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
|
||||
import translationTR from "../src/locales/tr/translation.json";
|
||||
import translationEN from "../src/locales/en/translation.json";
|
||||
|
||||
|
||||
const resources = {
|
||||
tr: {
|
||||
translation: translationTR
|
||||
},
|
||||
en: {
|
||||
translation: translationEN
|
||||
},
|
||||
};
|
||||
|
||||
i18n
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources,
|
||||
lng: "tr", // force default language
|
||||
fallbackLng: "en",
|
||||
debug: false,
|
||||
interpolation: {
|
||||
escapeValue: false, // not needed for react as it escapes by default
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user