import * as React from 'react'; import TablePagination from '@mui/material/TablePagination'; import Autocomplete from '@mui/material/Autocomplete'; import Box from '@mui/material/Box'; import TextField from '@mui/material/TextField'; import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles'; import * as locales from '@mui/material/locale'; export default function Locales() { const [locale, setLocale] = React.useState('zhCN'); const theme = useTheme(); const themeWithLocale = React.useMemo( () => createTheme(theme, locales[locale]), [locale, theme], ); return ( `${key.substring(0, 2)}-${key.substring(2, 4)}`} style={{ width: 300 }} value={locale} disableClearable onChange={(event, newValue) => { setLocale(newValue); }} renderInput={(params) => ( )} /> {}} /> ); }