-
Notifications
You must be signed in to change notification settings - Fork 46
Dictionary Integration
oazabir edited this page Oct 8, 2012
·
1 revision
When user hovers mouse on a word, whether Arabic or English, it will show a popup with the translation.
Whenever mouse hovers on a word for one sec, show a small popup which will show the translation of the word.
This site has an API that we can use to get the meanings of an Arabic word: http://aratools.com/
Make an http post to this URL, using a server side http handler:
http://aratools.com/dict-service
The post contains a parameter named "query".
query = {"dictionary":"AR-EN-WORD-DICTIONARY","word":"بِسْمِ ","dfilter":true}
It returns the html that you can show directly on the popup:
<table id='result'><th align='LEFT'>Form</th><th align='LEFT'>Gloss</th><th align='LEFT'>Pos</th><th align='LEFT'>Root</th><tr class='dict-table-even-row'><td class='arabic-text'>??????</td><td align='LEFT'>in/by (the) Name of</td><td align='LEFT'>Preposition, noun</td><td class='arabic-text'>بسم</td></tr></table>
Hit this URL inside an img tag and it will produce the Bangla meaning.