+ 1
how can change this "Text To Speech Class" to spanish?
public class TextToSpeechClass { /* access modifiers changed from: private */ public final TextToSpeech mTTS; public TextToSpeechClass(Context context) { this.mTTS = new TextToSpeech(context, new OnInitListener() { public void onInit(int i) { String str = "Lang"; if (i == 0) { int language = TextToSpeechClass.this.mTTS.setLanguage(Locale.ENGLISH); if (language == -1 || language == -2) { Log.e(str, "lang not supported"); return; } return; } Log.e(str, "initialization failed"); } }); }
1 Answer
+ 2
chk your code
int language = mTTS.setLanguage(Locale.ENGLISH);
or
int language = mTTS.setLanguage(Locale.getDefault());