UNPKG

demo-lenguaje-2

Version:
12 lines (9 loc) 309 B
import { withTranslation } from "react-i18next"; const Translation = props => { const { propsFrom, i18n, mainT } = props; if (propsFrom.language !== i18n.language) { i18n.changeLanguage(propsFrom.language); } return mainT(propsFrom); }; export default withTranslation()(Translation);