如何設置目標語言由英語支持法語。使用谷歌翻譯API:
NSString *urlString = [NSString stringWithFormat:@"http://www.translate.google.com/translate_tts?tl=en&q=%@",sentenceToSpeeh];
NSString *urlString = [NSString stringWithFormat:@"http://www.translate.google.com/translate_tts?tl=en&q=%@",sentenceToSpeeh];
改變為
NSString *urlString = [NSString stringWithFormat:@"http://www.translate.google.com/translate_tts?tl=fr&q=%@",sentenceToSpeeh];
然後再這樣:
NSString *urlString = [NSString stringWithFormat:@"http://www.translate.google.com/translate_tts?tl=%@&q=%@",myLanguage, sentenceToSpeeh];
在浏覽器裡試一下就可以了