Skip to content

djadmin/tongue.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tongue.js npm version Build Status

Helps writing multilingual JavaScript. Tongue.js transforms JavaScript written in any language to any target language.

Try it out using tongue.js REPL

Usage

tongue.transform(code, options);

Options

code : source code written in any langauge

locale: language code of the source. Eg: 'hi'

map: provide any custom translations for the locale

targetLocale: target language code

Example

tongue.transform('मानलो ल = 1;', {locale: 'hi'});

returns

"var ल = 1;"

Another Example

tongue.transform('警报(1);', {locale: 'cn', map: {'alert': '警报'}});

returns

"alert(1);"

Note

tongue.js supports both AMD and CommonJS module styles.

Contributions

Your contributions are always welcome!

License

Copyright (c) 2016 Dheeraj Joshi Licensed under the MIT license.

About

😛 Helps writing JavaScript code in any spoken language

Resources

License

Stars

Watchers

Forks

Packages

No packages published