| 1. | In the header, include the script element: |
|
<script type="text/javascript" src="http://www.wordchamp.com/lingua2/pages/scripts_prod/81606521a39b53661ce464707af10656.js"></script>
|
| 2. | After the page gets loaded call the methods to set up the WordChamp Reader. This example sets up a function in the header which is called after the body gets loaded. |
|
<head> <script type="text/javascript"> <!-- function enableWordChampReader() { WORDCHAMP.init("0163bfda16a68085bfc89b71ef09fe9bdf851592","http://www.wordchamp.com/lingua2/pages/flash_prod/3408923af5dbc917fd9efcd007552146.swf"); WORDCHAMP.setLanguages(WORDCHAMP.ENGLISH,WORDCHAMP.SPANISH); WORDCHAMP.prepareForReader(); } //--> </script> </head> <body onload="enableWordChampReader()"> ... </body>
|
| 3. | Call WORDCHAMP.init() with the access code you received for your site during registration and the path to the linguapi.swf that you downloaded from wordchamp.com. |
| 4. | Call WORDCHAMP.setLanguages() with the language ID for the language of the site and the translation target language. |
| 5. | Call WORDCHAMP.prepareForReader() to setup the web page for WordChamp Reader. |
| 6. | More class methods and constants for WordChamp Reader API are listed below. |