Localization in Pinyin with the tone marks

124 Views Asked by At

I am creating an iOS application in which there is a localisation of Pinyin Language. The issue seems to be that I am not getting the perfect translated word like Google Translate is giving.

I am using this piece of code to translate the Chinese characters to Pinyin, but I am not able to get the tone marks which are present in some of the Pinyin characters.

NSMutableString *pinyin = [NSMutableString stringWithString:string];
CFStringTransform((__bridge CFMutableStringRef)(pinyin), NULL, kCFStringTransformMandarinLatin, NO);

I want to this type of translation

Thank you

0

There are 0 best solutions below