try another color:
try another fontsize: 60% 70% 80% 90%
Mobabel
Build one Babel Tower in the mobile world to communicate!

Modict And How to Create Online Dictionary

  1. Compile URL
  2. XML
  3. HTML
  4. Plain Text
  5. Regular Expression Filter


Compile URL

Up
Firstly you should know the query url of word search, these are some examples:

http://dict.cn/ws.php?q=word

http://wap.mydict.com/API.php?q=wort

http://dict.bcwelt.de/api/bcsearch.php?f=de&t=en&w=wort

In most case, the last parameter in url need be kept for word, so your url will look like these:

http://dict.cn/ws.php?q=

http://wap.mydict.com/API.php?q=

http://dict.bcwelt.de/api/bcsearch.php?f=de&t=en&w=

Secondly you need know the output encode and the content format from these url.

XML

Up
if the returned content is in XML format, for example, like this:


<dict>
<key>word</key>
<lang>ec</lang>
<audio>http://dict.cn/mp3.php?q=efVw7</audio>
<pron>w:d</pron>
<def>word, letter, some translation</def>
<sent>
<orig>Could we have a word before you go to the meeting?</orig>
<trans>The firt translation for the sentence......</trans>
</sent>
<sent>
<orig>blablablablablablablablablablablablablabla</orig>
<trans>The second translation for the sentence......</trans>
</sent>
</dict>

so the content inside <pron>, <def> and <sent> is what you want to see, you can add those filter like this:

The output translation by online search will be like this:


w:d
word, letter, some translation
Could we have a word before you go to the meeting?
The firt translation for the sentence......
blablablablablablablablablablablablablabla
The second translation for the sentence......

You can change the filter order like this:

The output translation will be changed like this:


w:d
word, letter, some translation
Could we have a word before you go to the meeting?
blablablablablablablablablablablablablabla
The firt translation for the sentence......
The second translation for the sentence......

HTML

Up
For HTML content, operation is same as XML

Plain Text

Up
If the response content is not HTML neither XML, for example:


[server]
[Wort]Word[/Wort]
[def]translation of this word[/def]
[/server]

if you set filter like this:

The output translation by online search will be like this:


Word
translation of this word

or you can customize the order of filter like this:

The output translation will be changed like this:


translation of this word
Word

Regular Expression Filter

Up
If you know well about Regular Expression, you can also set the Regular Expression Filter to filter the content.

For example:

http://translate.google.com/translate_t?&langpair=de|en&ie=UTF8&oe=UTF8&text=was

The response content will be HTML format and very complex and this is the snap in the whole content, which you need:

The regular expression filter for this node will be:

id=.?result_box[^>]*>([^<]*)

The output translation by online search will be like this:

what