forked from organicmaps/organicmaps
[ios] Fixed @bykoianko comments. (TTS)
This commit is contained in:
parent
2df36d58d3
commit
66078b262b
2 changed files with 4 additions and 3 deletions
|
@ -226,16 +226,16 @@ namespace tts
|
|||
string bcp47ToTwineLanguage(NSString const * bcp47LangName)
|
||||
{
|
||||
if (bcp47LangName == nil || [bcp47LangName length] < 2)
|
||||
return "";
|
||||
return string("");
|
||||
|
||||
if ([bcp47LangName isEqualToString:@"zh-CN"] || [bcp47LangName isEqualToString:@"zh-CHS"]
|
||||
|| [bcp47LangName isEqualToString:@"zh-SG"])
|
||||
{
|
||||
return "zh-Hans"; // Chinese simplified
|
||||
return string("zh-Hans"); // Chinese simplified
|
||||
}
|
||||
|
||||
if ([bcp47LangName hasPrefix:@"zh"])
|
||||
return "zh-Hant"; // Chinese traditional
|
||||
return string("zh-Hant"); // Chinese traditional
|
||||
|
||||
// Taking two first symbols of a language name. For example ru-RU -> ru
|
||||
return [[bcp47LangName substringToIndex:2] UTF8String];
|
||||
|
|
|
@ -28,6 +28,7 @@ using namespace std;
|
|||
|
||||
_languages.reserve(3);
|
||||
auto const & v = tts.availableLanguages;
|
||||
NSAssert(!v.empty(), @"Vector can't be empty!");
|
||||
pair<string, string> const standart = v.front();
|
||||
_languages.push_back(standart);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue