Author |
Topic  |
puthenveetil
New Member

54 Posts |
Posted - 12 September 2009 : 19:43:35
|
Hi, Please help me to include Google transliteration api in the forum?Probably in post.asp and topic.asp.
This is the code needed to be incorporated with modifications. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script type="text/javascript" src="http://www.google.com/jsapi"> </script> <script type="text/javascript"> // Load the Google Transliteration API google.load("elements", "1", { packages: "transliteration" }); function onLoad() { var options = { sourceLanguage: 'en', // or google.elements.transliteration.LanguageCode.ENGLISH, destinationLanguage: ['hi'], // or [google.elements.transliteration.LanguageCode.HINDI], shortcutKey: 'ctrl+g', transliterationEnabled: true }; // Create an instance on TransliterationControl with the required // options. var control = new google.elements.transliteration.TransliterationControl(options); // Enable transliteration in the textfields with the given ids. var ids = [ "transl1", "transl2" ]; control.makeTransliteratable(ids); // Show the transliteration control which can be used to toggle between // English and Hindi. control.showControl('translControl'); } google.setOnLoadCallback(onLoad); </script> </head> <body> <center>Type in Hindi (Press Ctrl+g to toggle between English and Hindi)</center> <div id='translControl'></div> <br>Title : <input type='textbox' id="transl1"/> <br>Body<br><textarea id="transl2" style="width:600px;height:200px"></textarea> </body> </html>
Thanks |
Edited by - puthenveetil on 14 September 2009 15:22:02 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
puthenveetil
New Member

54 Posts |
Posted - 15 September 2009 : 21:10:31
|
Hi, Thanks for the quick response. 1.The textarea mentioned in the java script should pertain to the text fields in our "Reply to topic".Quick Reply" and New Topic pages textarea or text fields.I think like googiespell mode. so in the java script var ids = the above textarea.
The transliteration control or translControl should show up as googiespell control above the text field so that one can select the control before typing in the reply in Hindi.
|
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
puthenveetil
New Member

54 Posts |
Posted - 16 September 2009 : 01:07:28
|
Hi, Yes, your test forum works fine.However mine does'nt.OK plese give me a full detail as to which all asp pages should I amend.Is it only post.asp?
In post asp I have this line amended as under which does not look ok.
" <td bgColor=""" & strPopUpTableColor & """><textarea id=""ta1"" class=""textareaid=""transl2"" "" cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "</textarea><br /></td>" & vbNewLine & _
I see two textareas.One may be for poll mod i think.
I will email you my post.asp to have a look if you need.
Thanks
|
Edited by - puthenveetil on 16 September 2009 01:08:54 |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
puthenveetil
New Member

54 Posts |
Posted - 16 September 2009 : 11:36:22
|
Hi, Thanks. Do i have to change inc_header.asp also? |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
puthenveetil
New Member

54 Posts |
Posted - 16 September 2009 : 13:44:31
|
Thanks, I will do the changes in post.asp and let you know the outcome.
|
 |
|
puthenveetil
New Member

54 Posts |
Posted - 16 September 2009 : 16:00:29
|
Hi, It works.I need the button to be on a new line and at a smaller font as in your test forum. can I get the same controls on the Quick Reply page too. |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
puthenveetil
New Member

54 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Topic  |
|