Coder Social home page Coder Social logo

niebert / language4wiki Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5 KB

This is a language that supports language Javascript handling of AppLSACs to support the creation of support tools for learning resources. The provided package is used e.g. for language specific select boxes in HTML.

License: MIT License

JavaScript 73.04% Shell 26.96%

language4wiki's Introduction

Language4Wiki

This package provides supports for language Javascript handling of AppLSACs for MediaWikis learning resources (see Wikiversity). The repository contains JSON data structures for creating of language support for AppLSAC tools of learning resources. The provided package is used e.g. for language specific select boxes in HTML.

Example AppLSACs

Installation

Assuming you have already created a repository for you project and you want to use language4wiki in that project within your AppLSAC

npm install language4wiki --save

If you just want to use the package in your script install

npm install language4wiki

If you want to install that just for building your AppLSAC without using it in your WebApp that install

npm install language4wiki --save-dev

Usage

The package contains the

var l4w = require("language4wiki");

console.log(l4w.languages);
/*
will output
    {
        "text": "English",
        "value": "en"
    },
    {
        "text": "Spanish",
        "value": "es"
    },
    {
        "text": "German",
        "value": "de"
    },
    ...
}    
to the console */

Assume you want to create the options for a HTML select box with node you can create the code like this:

var langs = require("language4wiki").languages;
var html = "<select id='myselectbox'>"
for (var i = 0; i < langs.length; i++) {
  html += "\n  <option value='" + langs[i].value + "'>";
  html += "\n    " + langs[i].text
  html +) "\n  </option>";
}
html += "\n</select>";


console.log("SELECT-BOX: \n" + html);

language4wiki's People

Contributors

niebert avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.