const resources = {
en: {
translation: {
"welcomeDialogTitle": "Welcome to the MU Open-Air Museum"
}
},
fr: {
translation: {
"welcomeDialogTitle": "Bienvenue au musée de plein air MU"
}
}
};
import { useTranslation } from 'react-i18next';
function SomeComponent () {
const { t } = useTranslation();
return <div>{t("welcomeDialogTitle")}</div>
}
src/i18n/index.jswith an object mapping keys to EN and FR phrases like this: