val context = appContext
context.getString(key) is returning string in default language of system in android 12 , while it is returning string in selected language in android 13. Is there any alternative method to support for both. Needed string in the selected language
It's a reported issue with Per App Language. This is the suggested workaround. https://developer.android.com/reference/androidx/core/content/ContextCompat#getContextForLanguage(android.content.Context)
Use:
instead of: