1

My app supports 8 languages, English, French, German, Arabic, Spanish, Mandarin Chinese, Japanese and Russian languages.

There is a language picker inside SettingsFragment that allows the user to change the app language.

Users who have Android 13 and higher can change the app language as mentioned here.

In Android 13 and higher, Should I remove the language picker from SettingsFragment? Because the user can change the app language from outside as I mentioned in the link above.

I did not understand all points of this documentation so maybe my question was already answered there.

Thank you.

Taha Sami
  • 1,565
  • 1
  • 16
  • 43

1 Answers1

0

You can create locales_config.xml and add your language list inside it like this

After user pick language in your setting just call instead of keep value in database or share

val appLocale: LocaleListCompat = LocaleListCompat.forLanguageTags("xx-YY")
// Call this on the main thread as it may require Activity.restart()
AppCompatDelegate.setApplicationLocales(appLocale)

In my opinion you can keep the language picker for facilitate user.

siwarak
  • 177
  • 13