Closed Shinji22 closed 2 years ago
@Shinji22 do you want something like this https://codesandbox.io/s/hopeful-ptolemy-yjruw2?file=/demo.tsx:733-736?
Yes, exactly what I was looking for. Did i miss something about "import * as locales from "@mui/x-data-grid/locales";" in the documentation? Thanks for your help!
Order ID π³
45796
Duplicates
Latest version
The problem in depth π
Hi, We have a multilingual application, which adapts to the user's browser language. Before loading the application, we don't know the language to load for the application, especially for the Datagrid. In your examples (https://mui.com/x/react-data-grid/localization/#api) you show how to load a specific language, but not how to do it dynamically.
I would like to know how to load the translations of the DataGridPro from a language code (from the user's browser, or when the user chooses another language in the application). Something like the example concerning the global translation of MUI (https://mui.com/material-ui/guides/localization/#example). If the chosen language is not translated for the DataGridPro, we would fallback to English.
Thanks in advance,
Your environment π
`npx @mui/envinfo`
``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```