This commit is contained in:
sonora 2016-12-20 14:22:34 +01:00
parent fa7639189f
commit 79b5bbfbeb

View file

@ -169,7 +169,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
//#3344: Try Locale builder instead of constructor (only available from API 21)
if (android.os.Build.VERSION.SDK_INT >= 21) {
final String[] languageFields = language.split("\\_");
final Locale newLocale = new Locale.Builder().setLanguage("languageFields[0]").setScript("").setRegion("languageFields[1]").build();
final Locale newLocale = new Locale.Builder().setLanguage(languageFields[0]).setScript("").setRegion(languageFields[1]).build();
} else {
final Locale newLocale = new Locale(language);
}