Skip to content

Instantly share code, notes, and snippets.

@sidharrth2002
Created December 19, 2021 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidharrth2002/63b0728d244842b74d39fbe2eab6d494 to your computer and use it in GitHub Desktop.
Save sidharrth2002/63b0728d244842b74d39fbe2eab6d494 to your computer and use it in GitHub Desktop.
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