Update TTSCommandPlayerImpl.java
This commit is contained in:
parent
2f804daf25
commit
26d3e8eceb
1 changed files with 3 additions and 3 deletions
|
@ -191,7 +191,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
final float speechRate = cSpeechRate;
|
final float speechRate = cSpeechRate;
|
||||||
|
|
||||||
final String[] lsplit = (language + "____.").split("[\\_\\-]");
|
final String[] lsplit = (language + "____.").split("[\\_\\-]");
|
||||||
// As per BCP 47: well formed scripts [a-zA-Z]{4}, variants [0-9][0-9a-zA-Z]{3} | [0-9a-zA-Z]{5,8}, countries/regions [a-zA-Z]{2} | [0-9]{3}
|
// As per BCP 47: well formed scripts: [a-zA-Z]{4}, variants: [0-9][0-9a-zA-Z]{3} | [0-9a-zA-Z]{5,8}, countries/regions: [a-zA-Z]{2} | [0-9]{3}
|
||||||
String lregion = "";
|
String lregion = "";
|
||||||
String lvariant = "";
|
String lvariant = "";
|
||||||
String lscript = "";
|
String lscript = "";
|
||||||
|
@ -204,8 +204,8 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
lregion = lsplit[i];
|
lregion = lsplit[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Locale constructor supports 'language, region, variant'
|
// Locale constructor supports 'language, region, variant'.
|
||||||
//Locale newLocale0 = new Locale(lsplit[0], lregion, lvariant); //Setting variant here seems to cause errors on some systems
|
//Locale newLocale0 = new Locale(lsplit[0], lregion, lvariant); (Setting variant here seems to cause errors on some systems)
|
||||||
Locale newLocale0 = new Locale(lsplit[0], lregion);
|
Locale newLocale0 = new Locale(lsplit[0], lregion);
|
||||||
// #3344: Try Locale builder instead (only available from API 21), also supports script (we support as 4 letters)
|
// #3344: Try Locale builder instead (only available from API 21), also supports script (we support as 4 letters)
|
||||||
if (android.os.Build.VERSION.SDK_INT >= 21) {
|
if (android.os.Build.VERSION.SDK_INT >= 21) {
|
||||||
|
|
Loading…
Reference in a new issue