-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataGrid] Support ready-to-use locales #777
Comments
Reopening as we miss #984 to completely solve the issue. A large part of the problem has been solved though. |
Reopening, I think that we should at the very least document the import to use in https://master--material-ui-x.netlify.app/components/data-grid/localization/#locale-text. This information is currently not obvious to find (has to be inferred from the table and the core docs page).
I might also add that developers might/likely don't know how to use data grid and core translations at the same time. |
Ok, I added a code snippet that I got from the https://material-ui.com/guides/localization/#example. I made a PR with the change https://github.com/mui-org/material-ui-x/pull/1024/files |
@oliviertassinari |
Hey @nappalm, just a quick note - if you think there is a bug please open a new issue with a reproduction example so we can take a look. Also, I'm not sure if you check the localization example in the data grid docs: https://mui.com/x/react-data-grid/localization/ it might help as well to solve your problem. |
We have added the support in #196 for providing custom localization strings. It's also known as internationalization or i18n.
However, we can probably push it one step further. For the components in the main repository, we offer the capability to tap into pre-translated locales: https://material-ui.com/guides/localization/#locale-text. We aim to support the top 100 most used locales.
I think that we should offer the same capability here. There are two steps:
We might need to replace the current build infrastructure to use the one from the main repository to make it work. I think that we need to support:
or
We need the dev environment, where tree-shaking is disabled, to be fast.
Benchmark
The text was updated successfully, but these errors were encountered: