enUS locale is exported, but as an empty object
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
import { enUS } from '@material-ui/core/locale'
This import gives me an empty object.
Expected Behavior 🤔
To be able to import enUS (default) locale.
Steps to Reproduce 🕹
These steps are most likely not needed, because the locale is commented in the module: https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/locale/index.ts#L300
Context 🔦
I need to support dynamic language change, which seems not to be supported by current MUI localization. Therefore I’d like to import default locale, so I could use it with e.g. react-i18next.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Why this is an empty object when module.exports is assigned ...
The exports variable is available within a module's file-level scope, and is assigned the value of module.exports before the module is ...
Read more >Taleo Enterprise Taleo Web Services User Guide - Oracle
This type is a Taleo object very similar to the String type, but further allows to retrieve multilingual exported values. Multilingual values are...
Read more >The new Workfront experience | Export data
Whether you export a list of objects or a report, your exported file will have a file name and a title. You can...
Read more >Exporting Terrain, object data, and others! - The Hive Workshop
Ladik's MPQ Editor There are 5 Kinds of stuff you can export from a map. ... folder called enUS, and you got your...
Read more >certutil - Microsoft Learn
localename - CA locale name ... SubCA publishes the CA certificate to the DS CA object. ... CRL creates an empty CRL.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As mentioned, the issue is when you need to support dynamic language change.
If, for example, I set the pagination labels like this:
Is there something I’m missing? If there’s out-of-the-box way for doing this in MUI, I would definitely use that.
I believe the question is rhetorical )
As far as I understand the root of the problem is how to use the localization of the mui along with the localization of the application that uses the mui.
I don’t see any problem with this. We can use a separate provider (like https://react.i18next.com/latest/i18nextprovider) to localize application components as SomeOtherComponent.
Also, to customize the enUS locale of the mui components, in the end, it is needed to create a separate localization object. So I think that uncommenting the enUS locale is not necessary