Chinese JavaScript is a project aimed at providing basic features for writing and running JavaScript code with Chinese syntax. It includes a VM code runner to execute JavaScript code in an isolated sandbox environment.
This was originally just a meme between my developer friends and myself. But then I told myself, I could never find such a language that allows me to code in Chinese! Why not I build one myself? So this is how CN-js was born. It turned from a meme that everyone laughed and forget about after a while into a potentially huge project where so many Chinese developers may benefit from it.
So here is the Chinese locale version of our favourite programming language, JavaScript!
- Write JavaScript code using Chinese syntax.
- Execute code in an isolated sandbox environment for security.
- Basic support for common JavaScript operations and functions.
- Node.js installed on your machine.
- Clone the repository:
git clone https://github.com/yourusername/chinese-js.git
- Navigate to the project directory:
cd chinese-js
To use Chinese JavaScript, simply create a .cn.js file and start writing JavaScript code using Chinese keywords. The extension will automatically provide syntax highlighting and language support. You can get it here
let:让const:常量var:变量function:函数return:返回for:为forEach:为每个while:当do:做if:如果else if:否则如果else:否则throw:抛出new:新建try:尝试catch:捕获finally:最终instanceof:实例typeof:类型true:真(note: might be removed in the future to maintain Boolean in English)false:假(note: might be removed in the future to maintain Boolean in English)- basic maths operators such as
=,-,+are supported - all
consolemethods should function as expected.
CN-JavaScript is born to modify most of the basic syntax from regular JavaScript into Chinese Characters, however, we do want to make things more easier for existing JavaScript Developers who are interested in exploring CN-js. Therefore, as the project grows larger with more open source contributions, this README may be migrated to a more proper Documentation website.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.
- Thanks to all contributors and the open-source community.
If you encounter any bugs or issues, please report them on the GitHub Issues page.
- chinese-js
- chinese-javascript
- cn-javascript
- cnjs
- cn-js
- cndotjs
- chinesedotjs
- chinese-syntax
- localized-js
- multilingual-js
- js-localization
- language-extension