dead-brownD
Refine3y ago
27 replies
dead-brown

In my page strings are not translated

Hello i created a page through the inferencer code, now i'm using this code but strings are not translated and it seems that current locale is not used.

Thi is the code:
import React from "react";
import { useLocale } from 'react-admin'
import {
useDataGrid,
EditButton,
ShowButton,
DeleteButton,
List,
DateField,
} from "@refinedev/mui";

import {
DataGrid,
GridColDef
} from "@mui/x-data-grid";

import {
IResourceComponentsProps,
useTranslate
} from "@refinedev/core";

const SorgentiList: React.FC<IResourceComponentsProps> = () => {
const translate = useTranslate();
const { dataGridProps } = useDataGrid();
const columns = React.useMemo<GridColDef[]>(
() => [ /* columnsDefinition */
],
[translate],
);

return (
<List>
<DataGrid {...dataGridProps} columns={columns} autoHeight />
</List>
);
};
export default SorgentiList;
Was this page helpful?