mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-05 06:45:39 +00:00
Voice: use the ISO3 language and country codes
The Android 5.0 Text-to-speech output settings dialog checks that the languages from CheckVoiceData use the ISO3 language and country codes. This change matches that expectation.
This commit is contained in:
@@ -68,6 +68,15 @@ public class Voice {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return locale.toString().replace('_', '-');
|
||||
String ret = locale.getISO3Language();
|
||||
if (locale.getISO3Country() != null && !locale.getISO3Country().isEmpty()) {
|
||||
ret += '-';
|
||||
ret += locale.getISO3Country();
|
||||
}
|
||||
if (locale.getVariant() != null && !locale.getVariant().isEmpty()) {
|
||||
ret += '-';
|
||||
ret += locale.getVariant();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user