Quasilinear Thoughts

- A developer's log book.

Published on

Transliteration from Telugu to English using java

Authors

transliterate

The below example shows transliteration from Telugu to English using java.

Use Case: It can be useful to generate tags for Asian languages.

I have used IBM's International Component for Unicode for Java API.

package com.khalil.samples;

import com.ibm.icu.text.Transliterator;

/**
 *
 * @author Khalil
 *
 */

public class TransliterationExample {
	public static void main(String... args) {
		final String TEL_TO_ENG = "Telugu-En";
		String teluguWord = "నమస్కారము ";
		Transliterator toEnglish = Transliterator.getInstance(TEL_TO_ENG);
		String out = toEnglish.transliterate(teluguWord);
		System.out.println(teluguWord + "  > " + out);
	}
}

output

నమస్కారము > namaskāramu

Similarly, you can transliterate to any other language by changing the language code mentioned in line number5 in the above program.

Cheers..!

Comments are closed but If you want to respond, please send me a message over WhatsApp or facebook or tweet or send email.

Khalil

Khalil Ganiga

Just another programmer.. This blog expresses my views of various technologies and scenarios I have come across in realtime.

Keep watching this space for more updates.