After setting application locale of an android app, toast message is showing in previous language
Resource string (R.string.somevalue) returns previous language value.
For example, i am in a english language now, and i am changing into arabic now, but toast message is showing in english
Here is the code below :
AppCompatDelegate.setApplicationLocales(
LocaleListCompat.forLanguageTags(
"ar"
)
)
Toast.makeText(this, R.string.language_changed_successfully, Toast.LENGTH_LONG).show()