fikascript icon indicating copy to clipboard operation
fikascript copied to clipboard

Swedish JavaScript

FikaScript

Swedish Flag
FikaScript lets you write JavaScript in Swedish; Finally there is a way for Swedes to code in their native language! It is named after fika, the sacred Swedish coffee break.

See it in action here.

Including FikaScript files in your HTML

  • Include fikascript.js and fikascript.browser.js.
  • Make sure your html is set to allow utf-8 characters (add <meta charset="utf-8"> in the <head>).

FikaScript supports the text/fikascript MIME type. Any script tag with that type will be compiled and run automatically:

<script type="text/fikascript">
  om (x < 5) {
    konsol.log("hej!");
  } annars {
    konsol.log("nej!");
  }
</script>

You can also specify a src for your script tags:

<script type="text/fikascript" src="snaps.fika"></script>

Optional

Convert from FikaScript to JavaScript:
FikaScript.swedishToEnglish(code); // returns a string representing the translated code
Convert from JavaScript to FikaScript:
FikaScript.englishToSwedish(code); // returns a string representing the translated code

Missing/incorrect translations?

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...)