Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Talkback language dynamically?

I have an application with a translation quiz and I want to make it accessible to blind people. The problem is that when I focus on a Spanish sentence (for example), Talkback reads it in English. Is there any way to trigger the Spanish TTS dynamically in Java?

Thank you

like image 656
GoldenMat Avatar asked Apr 14 '26 23:04

GoldenMat


1 Answers

Yes there is now!

You have to wrap the string in a LocaleSpan (min sdk 17) and the latest version of TalkBack can switch language on the fly.

  • What's new in Android Accessibility 2017 - https://youtu.be/h5rRNXzy1xo?t=11m
  • https://developer.android.com/reference/android/text/style/LocaleSpan.html
like image 60
ataulm Avatar answered Apr 16 '26 14:04

ataulm