Help on transliterations

27 views
Skip to first unread message

kid

unread,
Mar 31, 2010, 7:32:08 AM3/31/10
to Google AJAX APIs
Hi, I'm trying to do transliteration on English words to Telugu. Below
is how my coding looks like. The output that I am expecting is the
English word "Hello, how are you." and the transliterated word of it
in Telugu right below the English word. But what I got from my coding
below is only the English word. Is something wrong with my coding? Can
anyone suggest solutions for this? Please and thank you.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
<title>Transliteration</title>
<script src="http://www.google.com/jsapi?
key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q"></
script>
<script type="text/javascript">


google.load("language", "1");

function initialize() {
var content = document.getElementById('content');
// Setting the text in the div.
content.innerHTML = '<div id="text">Hello, how are you.<\/div><div
id="translation"/>';

// Grabbing the text to translate
var text = document.getElementById("text").innerHTML;


google.language.transliterate(text, 'en', 'te', function(result) {
var translated = document.getElementById("translation");
if (result.transliterations) {
translated.innerHTML = result.transliterations;
}
});
}
google.setOnLoadCallback(initialize);

</script>
</head>
<body style="font-family: Arial;border: 0 none;">
<div id="content">Loading...</div>
</body>
</html>

jitesh dundas

unread,
Mar 31, 2010, 8:02:29 AM3/31/10
to google-ajax...@googlegroups.com
Hello,
Sometimes transliteration does not work for certail languages, e.g. pronouns.. or so..
 
Did you ttry your code for other words also?
 
Revert if so, I will look at that. I have a working code for English to Hindi..Change the language code and it should work fine..
 
Regards,
JD

 
--
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To post to this group, send email to google-ajax...@googlegroups.com.
To unsubscribe from this group, send email to google-ajax-searc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.


kid

unread,
Mar 31, 2010, 9:59:11 PM3/31/10
to Google AJAX APIs
Hello again,
Thanks for your suggestion. I did try to change the words. I also
changed the language code to Hindi and Arabic. But the output I got is
still the same as previously. Did I use correctly the method of
google.language.transliterate() ? You said that you have a working
coding for English to Hindi. May I have a look at it? I really
appreciate your help. ^.^

Mahendra Velladandi

unread,
Oct 30, 2013, 7:21:30 AM10/30/13
to google-ajax...@googlegroups.com, jitesh...@gmail.com
Hi,
     Can you share me the code for the Hindi Transliteration. Need to implement in our project.

Thanks,
Mahendra
To unsubscribe from this group, send email to google-ajax-search-api+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages