Correctly handle the new vi-hue language.

This commit is contained in:
Reece H. Dunn
2013-03-13 22:05:41 +00:00
parent 0e46be1177
commit c6cca792ee
2 changed files with 4 additions and 0 deletions
@@ -200,6 +200,7 @@ public class VoiceData
new Voice("tt", "test/tt", "tt", "tat", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Tatar", "tt", "This is a sample of text spoken in Tatar"),
new Voice("ur", "test/ur", "ur", "urd", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Urdu", "ur", "This is a sample of text spoken in Urdu"),
new Voice("vi", "vi", "vi", "vie", "", "", "", SpeechSynthesis.GENDER_MALE, "Vietnamese", "vi", "Đây là mẫu văn bản được đọc bằng Tiếng Việt"),
new Voice("vi-hue", "vi-hue", "vi", "vie", "", "", "hue", SpeechSynthesis.GENDER_MALE, "Vietnamese", "vi--hue", "Đây là mẫu văn bản được đọc bằng Tiếng Việt (HUE)"),
new Voice("wo", "test/wo", "wo", "wol", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Wolof", "wo", "This is a sample of text spoken in Wolof"),
new Voice("zh", "zh", "zh", "zho", "", "", "", SpeechSynthesis.GENDER_MALE, "Chinese (Mandarin)", "zh", "This is a sample of text spoken in 中文"),
new Voice("zh-yue", "zh-yue", "zh", "zho", "HK", "HKG", "", SpeechSynthesis.GENDER_MALE, "Chinese (Cantonese)", "zh-HK", "This is a sample of text spoken in 中文 (中華人民共和國香港特別行政區)"),
@@ -126,6 +126,9 @@ public class SpeechSynthesis {
} else if (name.equals("hy-west")) {
// 'west' is not a country code.
locale = new Locale("hy", "", "arevmda");
} else if (name.equals("vi-hue")) {
// 'hue' is not a country code, so treat it as a variant code.
locale = new Locale("vi", "", "hue");
} else if (name.equals("zh-yue")) {
// Android/Java does not support macrolanguages.
locale = new Locale("zh", "HK");