material-components / material-components/material-components-android
[DatePicker] Calendar Date comes in Marathi Language when we change locale to Marathi
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** After setting locale 'mr' (Marathi language), the dates are showing in Marathi, this same issue happening in Bengali too for locale 'bn'.
**Expected behavior:** The dates should come in English only not in based on current locale.
**Source code:** Add below code in onCreate of MainActivity and Run the app
link: https://github.com/material-components/material-components-android/blob/master/catalog/java/io/material/catalog/main/MainActivity.java#L49
```
Locale myLocale = new Locale("mr"); // for bengali set 'bn'
Resources res = getResources();
DisplayMetrics dm = res.getDisplayMetrics();
Configuration conf = res.getConfiguration();
conf.locale = myLocale;
res.updateConfiguration(conf, dm);
onConfigurationChanged(conf);
```
**Android API version:** API 34
**Material Library version:** 1.9.0
**Device:** Emulator Pixel 2 API 33
Here is the proof of issue:
| Expected in Hindi Language | Unexpected in Marathi |
| ------------- | ------------- |
|  |  |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MainActivity.java onCreate locale setup linked in the report and reproduce the DatePicker behavior using the Marathi (mr) and Bengali (bn) locales. Compare the displayed calendar dates with the expected English output. Done means DatePicker dates remain in English after either locale is applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100