Skip to content

JavaScript utility for translating between mandarin and cantonese 工具爲雙向翻譯繁體中文至粵語

Notifications You must be signed in to change notification settings

langtext/cantontrans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. 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.
  2. cantontransdata.js - contains the data array used in the translation
  3. example.html - example HTML user interface with example calls to cantontrans

Usage Examples (in example.html):

  1. translating from mandarin to cantonese: document.getElementById('M2C').onclick=function(){ cantontrans('M2C'); alert('done!'); };
  2. translating from cantonese to mandarin: document.getElementById('C2M').onclick=function(){ cantontrans('C2M'); alert('done!'); };

About

JavaScript utility for translating between mandarin and cantonese 工具爲雙向翻譯繁體中文至粵語

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published