SwiftUI - How to set Voiceover Language on view basis?

Viewed 122

In my SwiftUI App I have a TextView based on UIViewRepresentable. TextView displays text in different languages, depending on user action. All the text is always in the same language, i.e. it does not mix text of different languages at a time.

Now, I need to support VoiceOver and the problem is that TextViews text is always spoken in users preferred language, which is often inappropriate. I want to set the TextView's VoiceOver language depending on its text language without affecting my other views.

How to set VoiceOver language in SwiftUI on a view basis ?

Thanks

0 Answers
Related