6

I'm very confused about this new language stuff on Android 13.

I have a locales_config.xml file and that works fine but the documentation makes it sound like I can use LocaleListCompat in order to let users with Android 12 or older select the language.

However I haven't found any way to query all the languages listed on locales_config.xml other than parsing the XMl but that just doesn't feel right, plus the names of the languages wouldn't be translated.

So how should I go about giving users a choice of languages from locales_config.xml?

casolorz
  • 8,486
  • 19
  • 93
  • 200
  • have you checked this link ? https://stackoverflow.com/questions/74114067/get-list-of-locales-from-locale-config-in-android-13 – inkredusk Apr 15 '23 at 13:35
  • Yes but unless I'm reading that incorrectly, they are parsing the xml and there are no localized names for each language. Maybe when they get the locale list it gets translated? but they are still parsing the xml, right? – casolorz Apr 16 '23 at 03:37
  • 1
    Ok, so I think I can use this code to just get the language codes and then I can use the normal Locale library to get the display name, that will hopefully be localized. – casolorz Apr 19 '23 at 17:54

0 Answers0