match also dash for backward compatibility
This commit is contained in:
parent
93ee2c6f4d
commit
c1f957436f
1 changed files with 1 additions and 1 deletions
|
@ -170,7 +170,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) {
|
||||
try {
|
||||
final String[] languageFields = language.split("\\_");
|
||||
final String[] languageFields = language.split("[\\_\\-]");
|
||||
newLocale0 = new Locale.Builder().setLanguage(languageFields[0]).setScript("").setRegion(languageFields[1]).build();
|
||||
} catch (RuntimeException e) {
|
||||
// Falls back to "new Locale(language)"
|
||||
|
|
Loading…
Reference in a new issue