Created
December 19, 2021 15:37
-
-
Save sidharrth2002/63b0728d244842b74d39fbe2eab6d494 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import i18n from "i18next"; | |
import { initReactI18next } from "react-i18next"; | |
import en from "./translations/en/translations.json"; | |
import malay from "./translations/malay/translations.json"; | |
export const resources = { | |
English: { | |
translation: en, | |
}, | |
Malay: { | |
translation: malay, | |
}, | |
}; | |
i18n | |
.use(initReactI18next) | |
.init({ | |
resources, | |
lng: "English", | |
interpolation: { | |
escapeValue: false, | |
}, | |
}); | |
export default i18n; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment