0

I'm facing similar problem mentioned here in this SO post. Have notification channel got created something like this,

NotificationChannel channel = new NotificationChannel(CHANNEL_ID_FOOBAR, getContext().getString(R.string.notification_channel_foobar), NotificationManager.IMPORTANCE_DEFAULT);
notificationManager.createNotificationChannel(channel);

The string used as channel name R.string.notification_channel_foobar is not getting reflected with appropriate locale string when keyboard language gets changed. The suggested solution is to listen for ACTION_LOCALE_CHANGED and update the channel name again by invoking createNotificationChannel api.

Consider the following scenario,

  1. Device keyboard language is English now
  2. Changed the language to Japanese
  3. Rebooted the device

I'm expecting the appropriate Japanese string to get updated for the notification channel name. But this is not happening. Am I missing something? Or how this could have happened?

Tom Taylor
  • 2,378
  • 1
  • 27
  • 48
  • keyboard lang != device lang. but still you are right, you are passing fixed `String` fetched at the moment of channel creation, so further device lang change won't change this name... – snachmsm Feb 25 '21 at 10:54
  • Why would you want to to do that ? – Mustafa Ibrahim Feb 25 '21 at 11:01
  • @MustafaIbrahim : Trying to understand, here after reboot the notification channel would be created for the first time. So here in this case it should have fetched the appropriate (from Japanese folder instead of english) value right? – Tom Taylor Feb 25 '21 at 11:35

0 Answers0