import { useLocales, useTranslate } from 'src/locales';
function MultiLanguage() {
const { t, onChangeLang } = useTranslate();
const { allLang, currentLang } = useLocales();
return (
<>
<RadioGroup row value={currentLang.value} onChange={(event) => onChangeLang(event.target.value)}>
{allLang.map((lang) => (
<FormControlLabel key={lang.label} value={lang.value} label={lang.label} control={<Radio />} />
))}
</RadioGroup>
<Typography variant="h2">{t('heading')}</Typography>
<Typography variant="body2">{t('nested.nested1')}</Typography>
</>
);
}