CANTONTRANS README
Description: This is a JavaScript utility that translates to and from traditional chinese characters mandarin and cantonese. It contains 3 files including an example.html.
Modules:
- cantontranscode.js - contains JavaScript function cantontrans() that takes two parameters 'M2C' to translate the value of maintext HTML textarea from traditional characters mandarin to cantonese, and 'C2M' to translate back to mandarin.
- cantontransdata.js - contains the data array used in the translation
- example.html - example HTML user interface with example calls to cantontrans
Usage Examples (in example.html):
- translating from mandarin to cantonese: document.getElementById('M2C').onclick=function(){ cantontrans('M2C'); alert('done!'); };
- translating from cantonese to mandarin: document.getElementById('C2M').onclick=function(){ cantontrans('C2M'); alert('done!'); };