KoffieScript lets you write JavaScript in Dutch; Finally there is a way for Dutch people to code in their native language!
See it in action here.
- Include koffiescript.js and koffiescript.browser.js.
- Make sure your html is set to allow utf-8 characters (add
<meta charset="utf-8">
in the ).
KoffieScript supports the text/koffiescript
MIME type. Any script tag with that type will be compiled and run automatically:
<script type="text/koffiescript">
als (x < 5) {
console.log("hallo!");
} anders {
console.log("dacht het niet!");
}
</script>
You can also specify a src
for your script tags:
<script type="text/koffiescript" src="snaps.koffie"></script>
KoffieScript.DutchToEnglish(code); // returns a string representing the translated code
KoffieScript.EnglishToDutch(code); // returns a string representing the translated code
You can see the translations over here. Feel free to submit a pull request!
###TO-DOs
- Syntax highlighting for unicode chars
- npm support for command line compiling
- Add more translations!!! (ex: Array.pop, push, etc...)