Home • HanBar™ Lexicon • Expression Server
|Brought to you by
The Hanbar™ Lexicon Expression Server sends you a random expression from the Hanbar database. By following the instructions below, you can show a phrase-a-day on your website, and start practicing your Chinese today.
How it Works
The Expression Server has access to the same database of expressions that Hanbar Lexicon uses. You use it by visiting this page with a few parameters, such as the subject category, and the format you want the Expression Server to present it to you. Some of the categories are:
How To (The Basics)
Here's one possible way of doing this. You can copy this and paste it into your web page.
You can substitute another category in place of conversation if you'd prefer.
If your sample is producing a random jumble of letters and strange jibberish instead of Chinese characters, it could be because your web page isn't set to use Unicode. This can be fixed by making sure the meta tag shown below appears near the top of your webpage:
If you don't have access to the head section of your web page, or if you already have another charset given there, you'll have to resort to advanced programming techniques.
Anyway, the example above is just does a bare-bones presentation. A bit more HTML, and you can have a rather fancy presentation.
How To (Advanced)
For the techno-geeky, here are all the parameters in their full glory:
The formats available are:
http://woxuezhongwen.com/hanbar/exprserver.asp?pinyin=bu4&format=xmlThis example fetches one of the expressions with a character pronounced bu in the 4th tone, returning the response in Hanbar XML.
The Fine Print
Using the Expression Server is free. The only thing we ask is that you attribute us as the provider of the expressions, and put a link to the http://woxuezhongwen.com main site near the provided content. It can be as simple as the following:
That's not too much to ask, is it?
Thanks, and enjoy!