withTranslation()(LegacyComponentClass)
const { t } = this.props;
import { useTranslation } from 'react-i18next';
function MyComponent() {
const { t, i18n } = useTranslation();