How do I say "this text is in this language" in Jetpack Compose so the screenreader reads it correctly? 🤔
Important for apps that show texts in multiple languages.
How do I say "this text is in this language" in Jetpack Compose so the screenreader reads it correctly? 🤔
Important for apps that show texts in multiple languages.
@ConnyDuck Create an AnnotatedString and surround the text with a SpanStyle specifying the "localeList" argument.
val text = buildAnnotatedString {
withStyle(SpanStyle(localeList = LocaleList("fr"))) {
append("Bonjour !")
}
}