Skip to content
+

Data Grid - Translated components

The data grid allows to support users from different locales, with formatting, and localized strings.

The default locale of MUI is English (United States). If you want to use other locales, follow the instructions below.

Translation keys

You can use the localeText prop to pass in your own text and translations. You can find all the translation keys supported in the source in the GitHub repository. In the following example, the labels of the density selector are customized.

Press Enter to start editing

Locale text

The default locale of MUI is English (United States).

You can use the theme to configure the locale text:

import { createTheme, ThemeProvider } from '@mui/material/styles';
import { DataGrid, bgBG } from '@mui/x-data-grid';

const theme = createTheme(
  {
    palette: {
      primary: { main: '#1976d2' },
    },
  },
  bgBG,
);

<ThemeProvider theme={theme}>
  <DataGrid />
</ThemeProvider>;

Note that createTheme accepts any number of arguments. If you are already using the translations of the core components, you can add bgBG as a new argument. The same import works for DataGridPro as it's an extension of DataGrid.

import { createTheme, ThemeProvider } from '@mui/material/styles';
import { DataGrid, bgBG } from '@mui/x-data-grid';
import { bgBG as pickersBgBG } from '@mui/x-date-pickers/locales';
import { bgBG as coreBgBG } from '@mui/material/locale';

const theme = createTheme(
  {
    palette: {
      primary: { main: '#1976d2' },
    },
  },
  bgBG, // x-data-grid translations
  pickersBgBG, // x-date-pickers translations
  coreBgBG, // core translations
);

<ThemeProvider theme={theme}>
  <DataGrid />
</ThemeProvider>;

If you want to pass language translations directly to the data grid without using createTheme and ThemeProvider, you can directly load the language translations from the @mui/x-data-grid or @mui/x-data-grid-pro package.

import { DataGrid, nlNL } from '@mui/x-data-grid';

<DataGrid localeText={nlNL.components.MuiDataGrid.defaultProps.localeText} />;

Supported locales

LocaleBCP 47 language tagImport nameCompletionSource file
Arabic (Sudan)ar-SDarSD
118/119
Edit
Belarusianbe-BYbeBY
93/119
Edit
Bulgarianbg-BGbgBG
87/119
Edit
Chinese (Simplified)zh-CNzhCN
Done ๐ŸŽ‰
Edit
Chinese (Taiwan)zh-TWzhTW
Done ๐ŸŽ‰
Edit
Czechcs-CZcsCZ
Done ๐ŸŽ‰
Edit
Danishda-DKdaDK
94/119
Edit
Dutchnl-NLnlNL
Done ๐ŸŽ‰
Edit
Finnishfi-FIfiFI
Done ๐ŸŽ‰
Edit
Frenchfr-FRfrFR
Done ๐ŸŽ‰
Edit
Germande-DEdeDE
Done ๐ŸŽ‰
Edit
Greekel-GRelGR
Done ๐ŸŽ‰
Edit
Hebrewhe-ILheIL
111/119
Edit
Hungarianhu-HUhuHU
117/119
Edit
Italianit-ITitIT
Done ๐ŸŽ‰
Edit
Japaneseja-JPjaJP
Done ๐ŸŽ‰
Edit
Koreanko-KRkoKR
92/119
Edit
Norwegian (Bokmรฅl)nb-NOnbNO
94/119
Edit
Persianfa-IRfaIR
Done ๐ŸŽ‰
Edit
Polishpl-PLplPL
92/119
Edit
Portuguese (Brazil)pt-BRptBR
Done ๐ŸŽ‰
Edit
Romanianro-ROroRO
Done ๐ŸŽ‰
Edit
Russianru-RUruRU
Done ๐ŸŽ‰
Edit
Slovaksk-SKskSK
Done ๐ŸŽ‰
Edit
Spanishes-ESesES
Done ๐ŸŽ‰
Edit
Swedishsv-SEsvSE
94/119
Edit
Turkishtr-TRtrTR
104/119
Edit
Ukrainianuk-UAukUA
Done ๐ŸŽ‰
Edit
Urdu (Pakistan)ur-PKurPK
93/119
Edit
Vietnamesevi-VNviVN
Done ๐ŸŽ‰
Edit

You can find the source in the GitHub repository.

To create your own translation or to customize the English text, copy this file to your project, make any changes needed and import the locale from there. Note that these translations of the Data Grid component depend on the Localization strategy of the whole library.

RTL Support

Right-to-left languages such as Arabic, Persian, or Hebrew are supported. Follow this guide to use them.

The example below demonstrates how to use an RTL language (Arabic) with the data grid.

Press Enter to start editing