3

In my app I need to use punjabi language and English Language.So I customized the keyboard to show punjabi alphabets. I need to use these punjabi words for implementing a search, but the database will not support punjabi language.The punjabi data is stored in the database in English format. So I need to convert the punjabi text again to English before starting the search. I tried the following code to get back the word in English form.

[txtSearch setFont:[UIFont systemFontOfSize:20]];

But again I am getting punjabi text. Is there any way to convert back these words ?

Searching screen in my app

Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
Vishnu Kumar. S
  • 1,797
  • 1
  • 15
  • 35
  • Did you mean translit (http://en.wikipedia.org/wiki/Transliteration )?Then you need found the transliteral scheme and use on press button handler. – stosha May 29 '13 at 16:54
  • @stosha: I mean convert the alphabets in Punjabi language to English. Similar to writing your name in different languages. In this case the word sounds same in different languages, but the only difference is the alphabets. – Vishnu Kumar. S May 30 '13 at 04:24
  • 1
    http://stackoverflow.com/questions/10227984/transliterate-transpose-the-characters-in-the-nsstring – stosha May 30 '13 at 05:41

1 Answers1

1
NSMutableString *buffer = [@"русский язык" mutableCopy];
CFMutableStringRef bufferRef = (__bridge CFMutableStringRef)buffer;
CFStringTransform(bufferRef, NULL, kCFStringTransformToLatin, false);
NSLog(@"%@", buffer);