toloframework
Version:
Javascript/HTML/CSS compiler for Firefox OS or nodewebkit apps using modules in the nodejs style.
24 lines (22 loc) • 410 B
JavaScript
function $(id) {
return window.document.getElementById(id);
}
function setLanguage(lang) {
require("$").lang(lang);
window.location = "index.html";
}
$("welcome").textContent = _("welcome");
$("fr").addEventListener(
"click",
function() {
setLanguage("fr");
},
false
);
$("en").addEventListener(
"click",
function() {
setLanguage("en");
},
false
);