material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.34k stars 3.06k forks source link

[DatePicker] Calendar Date comes in Marathi Language when we change locale to Marathi #3992

Open kishorejethava opened 9 months ago

kishorejethava commented 9 months ago

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
Screenshot_20240115_121358 Screenshot_20240115_121538
kishorejethava commented 6 months ago

Hello @leticiarossi, When we can expect this fix release.