import Autocomplete from "@mui/material/Autocomplete"; import TextField from "@mui/material/TextField"; import Box from "@mui/material/Box"; import React from "react"; import { useTranslation } from "react-i18next"; import { useTranslation as useRefineTranslation } from "@refinedev/core"; const I18nPicker = () => { const { i18n } = useTranslation(); const { getLocale, changeLocale } = useRefineTranslation(); const currentLocale = getLocale(); return ( { return }} renderOption={(props, option) => { const { key, ...optionProps } = props; return ( img': { mr: 2, flexShrink: 0 } }} {...optionProps} > { option } ); }} onChange={(event, value) => { changeLocale(value); }} /> ) } export default I18nPicker;